1 | <?php |
||
16 | class IndexResource extends Container { |
||
17 | |||
18 | /** @var CookieStore */ |
||
19 | private $cookies; |
||
20 | |||
21 | /** @var WebApplication */ |
||
22 | private $app; |
||
23 | |||
24 | /** |
||
25 | * @param Factory $factory <- |
||
26 | * @param WebApplication $app <- |
||
27 | * @param CookieStore $cookies <- |
||
28 | */ |
||
29 | public function __construct(Factory $factory, WebApplication $app, CookieStore $cookies) { |
||
34 | |||
35 | /** |
||
36 | * @param Request|WebRequest $request |
||
37 | * @return \watoki\curir\delivery\WebResponse |
||
38 | */ |
||
39 | public function respond(Request $request) { |
||
49 | |||
50 | /** |
||
51 | * @param WebRequest $request <- |
||
52 | * @return array |
||
53 | */ |
||
54 | public function doGet(WebRequest $request) { |
||
68 | |||
69 | /** |
||
70 | * @param Url $base |
||
71 | * @return array |
||
72 | */ |
||
73 | private function assembleActions(Url $base) { |
||
84 | |||
85 | protected function createDefaultRenderer() { |
||
88 | } |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.