1 | <?php |
||
23 | class Http extends AbstractBootstrap |
||
24 | { |
||
25 | /** |
||
26 | * Auth. |
||
27 | * |
||
28 | * @var Auth |
||
29 | */ |
||
30 | protected $auth; |
||
31 | |||
32 | /** |
||
33 | * Hook. |
||
34 | * |
||
35 | * @var Hook |
||
36 | */ |
||
37 | protected $hook; |
||
38 | |||
39 | /** |
||
40 | * Router. |
||
41 | * |
||
42 | * @var Router |
||
43 | */ |
||
44 | protected $router; |
||
45 | |||
46 | /** |
||
47 | * Server. |
||
48 | * |
||
49 | * @var Server |
||
50 | */ |
||
51 | protected $server; |
||
52 | |||
53 | /** |
||
54 | * Http. |
||
55 | * |
||
56 | * @param LoggerInterface $logger |
||
57 | * @param Auth $auth |
||
58 | * @param Hook $hook |
||
59 | * @param Router $router |
||
60 | * @param Server $server |
||
61 | */ |
||
62 | public function __construct(LoggerInterface $logger, Auth $auth, Hook $hook, Router $router, Server $server) |
||
71 | |||
72 | /** |
||
73 | * Process. |
||
74 | * |
||
75 | * @return Http |
||
76 | */ |
||
77 | public function process() |
||
101 | |||
102 | /** |
||
103 | * Send invalid authentication response. |
||
104 | */ |
||
105 | protected function invalidAuthentication(): void |
||
126 | |||
127 | /** |
||
128 | * Set exception handler. |
||
129 | * |
||
130 | * @return Http |
||
131 | */ |
||
132 | protected function setExceptionHandler(): self |
||
151 | } |
||
152 |
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.