1 | <?php |
||
15 | class WriteTokenToCookie |
||
16 | { |
||
17 | protected $sharedListeners = []; |
||
18 | |||
19 | /** |
||
20 | * @var ContainerInterface |
||
21 | */ |
||
22 | protected $serviceLocator; |
||
23 | |||
24 | public function __construct(ContainerInterface $serviceLocator) |
||
28 | |||
29 | public function attachShared(SharedEventManagerInterface $events) |
||
43 | |||
44 | public function detachShared(SharedEventManagerInterface $events) |
||
52 | |||
53 | public function authenticate(AdapterChainEvent $e) |
||
63 | |||
64 | public function logout(AdapterChainEvent $e) |
||
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | protected function isValidRequestAndResponse() |
||
86 | |||
87 | /** |
||
88 | * @return RememberMeService |
||
89 | */ |
||
90 | public function getRememberMeService() |
||
94 | |||
95 | /** |
||
96 | * @return ResponseInterface |
||
97 | */ |
||
98 | public function getResponse() |
||
102 | |||
103 | /** |
||
104 | * @return RequestInterface |
||
105 | */ |
||
106 | public function getRequest() |
||
110 | |||
111 | /** |
||
112 | * @return CookieService |
||
113 | */ |
||
114 | public function getCookieService() |
||
118 | } |
||
119 |
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.