BaseInputFilter::$data property has null|array in DocBlock. Also in BaseInputFilter::setData() it makes sure that we initialize property with an array. But for some reason BaseInputFilter::validateInputs() in DocBlock we have array|ArrayAccess union for $data argument.
BaseInputFilter::validateInputs() is used internally in BaseInputFilter::isValid() and there we pass BaseInputFilter::$data as an argument that should be null|array.
The risk here is in case of child classes that pass ArrayAccess into BaseInputFilter::validateInputs(), then this piece of code will fail
// If input is optional (not required), and value is not set, then ignore.
if (! array_key_exists($name, $data)
&& ! $input->isRequired()
) {
continue;
}
Silently with wrong result of array_key_exists() if PHP’s error_reporting is turned off, otherwise app will throw deprecated warning. “PHP Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead”