1 | <?php |
||
19 | final class ResourceHandler |
||
20 | { |
||
21 | /** |
||
22 | * @var ResourceInterface |
||
23 | */ |
||
24 | private $resource; |
||
25 | |||
26 | /** |
||
27 | * @var RouterInterface |
||
28 | */ |
||
29 | private $router; |
||
30 | |||
31 | /** |
||
32 | * @var StreamRenderer |
||
33 | */ |
||
34 | private $render; |
||
35 | |||
36 | /** |
||
37 | * @param ResourceInterface $resource |
||
38 | * @param RouterInterface $router |
||
39 | * @param RenderInterface $render |
||
40 | */ |
||
41 | 6 | public function __construct( |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 6 | public function __invoke(RequestInterface $request, Response $response, callable $next = null) |
|
60 | |||
61 | /** |
||
62 | * @param RequestInterface $request |
||
63 | * @param Response $response |
||
64 | * |
||
65 | * @return Response |
||
66 | */ |
||
67 | 6 | public function handle(ServerRequestInterface $request, Response $response) |
|
82 | |||
83 | /** |
||
84 | * @param Response $response |
||
85 | * @param ResourceObject $resourceObject |
||
86 | * |
||
87 | * @return Response |
||
88 | */ |
||
89 | 5 | private function toPsr7Response(Response $response, ResourceObject $resourceObject) |
|
102 | } |
||
103 |
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.