$resourceDO is of type object<Staticus\Resources\ResourceDOInterface>, but the property $resourceDO was declared to be of type object<Staticus\Resources\File\ResourceDO>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?
Our type inference engine has found a suspicous assignment of a value to a property.
This check raises an issue when a value that can be of a given class or a super-class
is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
39
ServerRequestInterface $request,
40
ResponseInterface $response,
41
callable $next = null
42
)
43
{
44
parent::__invoke($request, $response, $next);
45
$this->response = $this->action();
46
47
return $this->next();
48
}
49
50
abstract protected function search(ResourceDOInterface $resourceDO);
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.