It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
It seems like $decorator of type object<ZfTable\Decorator\DataAccessInterface> is incompatible with the declared type object<ZfTable\Decorator\AbstractDecorator> of property $decorator.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
It seems like you code against a specific sub-type and not the parent class ZfTable\Decorator\AbstractDecorator as the method getActualRow() does only exist in the following sub-classes of ZfTable\Decorator\AbstractDecorator: ZfTable\Decorator\Cell\AbstractCellDecorator, ZfTable\Decorator\Cell\AttrDecorator, ZfTable\Decorator\Cell\CallableDecorator, ZfTable\Decorator\Cell\ClassDecorator, ZfTable\Decorator\Cell\Editable, ZfTable\Decorator\Cell\Icon, ZfTable\Decorator\Cell\Link, ZfTable\Decorator\Cell\Mapper, ZfTable\Decorator\Cell\Template, ZfTable\Decorator\Cell\VarAttrDecorator, ZfTable\Decorator\Row\AbstractRowDecorator, ZfTable\Decorator\Row\ClassDecorator, ZfTable\Decorator\Row\Separatable, ZfTable\Decorator\Row\VarAttr. Maybe you want to instanceof check for one of these explicitly?
Let’s take a look at an example:
abstractclassUser{/** @return string */abstractpublicfunctiongetPassword();}classMyUserextendsUser{publicfunctiongetPassword(){// return something}publicfunctiongetDisplayName(){// return some name.}}classAuthSystem{publicfunctionauthenticate(User$user){$this->logger->info(sprintf('Authenticating %s.',$user->getDisplayName()));// do something.}}
In the above example, the authenticate() method works fine as long as you just pass
instances of MyUser. However, if you now also want to pass a different sub-classes
of User which does not have a getDisplayName() method, the code will break.
classAuthSystem{publicfunctionauthenticate(User$user){if($userinstanceofMyUser){$this->logger->info(/** ... */);}// or alternativelyif(!$userinstanceofMyUser){thrownew\LogicException('$user must be an instance of MyUser, '.'other instances are not supported.');}}}
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types
inside the if block in such a case.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..