1 | <?php |
||
13 | class Redis implements TokenStorageInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $key; |
||
19 | |||
20 | protected $stateKey; |
||
21 | |||
22 | /** |
||
23 | * @var object|\Redis |
||
24 | */ |
||
25 | protected $redis; |
||
26 | |||
27 | /** |
||
28 | * @var object|TokenInterface |
||
29 | */ |
||
30 | protected $cachedTokens; |
||
31 | |||
32 | /** |
||
33 | * @var object |
||
34 | */ |
||
35 | protected $cachedStates; |
||
36 | |||
37 | /** |
||
38 | * @param Predis $redis An instantiated and connected redis client |
||
39 | * @param string $key The key to store the token under in redis |
||
40 | * @param string $stateKey The key to store the state under in redis. |
||
41 | */ |
||
42 | public function __construct(Predis $redis, $key, $stateKey) |
||
50 | |||
51 | /** |
||
52 | * {@inheritDoc} |
||
53 | */ |
||
54 | public function retrieveAccessToken($service) |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function storeAccessToken($service, TokenInterface $token) |
||
81 | |||
82 | /** |
||
83 | * {@inheritDoc} |
||
84 | */ |
||
85 | public function hasAccessToken($service) |
||
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | */ |
||
99 | public function clearToken($service) |
||
107 | |||
108 | /** |
||
109 | * {@inheritDoc} |
||
110 | */ |
||
111 | public function clearAllTokens() |
||
132 | |||
133 | /** |
||
134 | * {@inheritDoc} |
||
135 | */ |
||
136 | public function retrieveAuthorizationState($service) |
||
150 | |||
151 | /** |
||
152 | * {@inheritDoc} |
||
153 | */ |
||
154 | public function storeAuthorizationState($service, $state) |
||
163 | |||
164 | /** |
||
165 | * {@inheritDoc} |
||
166 | */ |
||
167 | public function hasAuthorizationState($service) |
||
177 | |||
178 | /** |
||
179 | * {@inheritDoc} |
||
180 | */ |
||
181 | public function clearAuthorizationState($service) |
||
189 | |||
190 | /** |
||
191 | * {@inheritDoc} |
||
192 | */ |
||
193 | public function clearAllAuthorizationStates() |
||
214 | |||
215 | /** |
||
216 | * @return Predis $redis |
||
217 | */ |
||
218 | public function getRedis() |
||
222 | |||
223 | /** |
||
224 | * @return string $key |
||
225 | */ |
||
226 | public function getKey() |
||
230 | } |
||
231 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..