1 | <?php |
||
11 | class Redis implements TokenStorageInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $key; |
||
17 | |||
18 | protected $stateKey; |
||
19 | |||
20 | /** |
||
21 | * @var object|\Redis |
||
22 | */ |
||
23 | protected $redis; |
||
24 | |||
25 | /** |
||
26 | * @var object|TokenInterface |
||
27 | */ |
||
28 | protected $cachedTokens; |
||
29 | |||
30 | /** |
||
31 | * @var object |
||
32 | */ |
||
33 | protected $cachedStates; |
||
34 | |||
35 | /** |
||
36 | * @param Predis $redis An instantiated and connected redis client |
||
37 | * @param string $key The key to store the token under in redis |
||
38 | * @param string $stateKey the key to store the state under in redis |
||
39 | */ |
||
40 | public function __construct(Predis $redis, $key, $stateKey) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function retrieveAccessToken($service) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function storeAccessToken($service, TokenInterface $token) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function hasAccessToken($service) |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function clearToken($service) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function clearAllTokens() |
||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | public function retrieveAuthorizationState($service) |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function storeAuthorizationState($service, $state) |
||
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | public function hasAuthorizationState($service) |
||
175 | |||
176 | /** |
||
177 | * {@inheritdoc} |
||
178 | */ |
||
179 | public function clearAuthorizationState($service) |
||
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | public function clearAllAuthorizationStates() |
||
212 | |||
213 | /** |
||
214 | * @return Predis $redis |
||
215 | */ |
||
216 | public function getRedis() |
||
220 | |||
221 | /** |
||
222 | * @return string $key |
||
223 | */ |
||
224 | public function getKey() |
||
228 | } |
||
229 |
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..