1 | <?php |
||
13 | class RememberMeService |
||
14 | { |
||
15 | /** |
||
16 | * @var Request |
||
17 | */ |
||
18 | protected $request; |
||
19 | |||
20 | /** |
||
21 | * @var RemoteAddress |
||
22 | */ |
||
23 | protected $ipService; |
||
24 | |||
25 | /** |
||
26 | * @var SerieTokenMapperInterface |
||
27 | */ |
||
28 | protected $mapper; |
||
29 | |||
30 | /** |
||
31 | * @var ModuleOptions |
||
32 | */ |
||
33 | protected $moduleOptions; |
||
34 | |||
35 | /** |
||
36 | * @param int $userId |
||
37 | * @return SerieTokenInterface |
||
38 | */ |
||
39 | 1 | public function createNew($userId) |
|
62 | |||
63 | /** |
||
64 | * @param SerieTokenInterface $serieToken |
||
65 | * @return SerieTokenInterface|null |
||
66 | */ |
||
67 | 4 | public function getNextInSerie(SerieTokenInterface $serieToken) |
|
86 | |||
87 | /** |
||
88 | * @return \DateTime |
||
89 | */ |
||
90 | 2 | protected function getNewExpireDate() |
|
94 | |||
95 | /** |
||
96 | * @param int $userId |
||
97 | * @param string $serieId |
||
98 | */ |
||
99 | 2 | public function removeSerie($userId, $serieId) |
|
106 | |||
107 | /** |
||
108 | * @note Should NOT contain semicolons. |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | 2 | private function generateRandom() |
|
116 | |||
117 | /** |
||
118 | * @return SerieTokenMapper |
||
119 | */ |
||
120 | 6 | public function getMapper() |
|
124 | |||
125 | /** |
||
126 | * @param SerieTokenMapper $mapper |
||
127 | * @return $this |
||
128 | */ |
||
129 | 6 | public function setMapper($mapper) |
|
134 | |||
135 | /** |
||
136 | * @return ModuleOptions |
||
137 | */ |
||
138 | 1 | public function getModuleOptions() |
|
142 | |||
143 | /** |
||
144 | * @param ModuleOptions $moduleOptions |
||
145 | * @return $this |
||
146 | */ |
||
147 | 6 | public function setModuleOptions($moduleOptions) |
|
152 | |||
153 | /** |
||
154 | * @param RemoteAddress $ipService |
||
155 | * @return $this |
||
156 | */ |
||
157 | 6 | public function setIpService($ipService) |
|
162 | |||
163 | /** |
||
164 | * @return RemoteAddress |
||
165 | */ |
||
166 | 1 | public function getIpService() |
|
170 | |||
171 | /** |
||
172 | * @param Request $request |
||
173 | */ |
||
174 | 6 | public function setRequest($request) |
|
178 | |||
179 | /** |
||
180 | * @return Request |
||
181 | */ |
||
182 | 1 | public function getRequest() |
|
186 | } |
||
187 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: