Currently, the $resource variable is defined as a mixed type.
The mixed type is an alias for string|int|float|bool|null|array|object|callable|resource.
I'll frankly admit that I can't imagine a use-case in which $resource could take a value other than object
Therefore, I suggest that we narrow down the type of $resource down to object
(or even down to hypothetical \Authorization\Policy\ResourceInterface)
Currently, the
$resourcevariable is defined as amixedtype.The mixed type is an alias for
string|int|float|bool|null|array|object|callable|resource.I'll frankly admit that I can't imagine a use-case in which
$resourcecould take a value other than objectTherefore, I suggest that we narrow down the type of
$resourcedown toobject(or even down to hypothetical
\Authorization\Policy\ResourceInterface)