1 | <?php |
||
21 | class StorableJWKSet implements StorableJWKSetInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var \Jose\Object\JWKSetInterface |
||
25 | */ |
||
26 | protected $jwkset; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $filename; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $parameters; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $nb_keys; |
||
42 | |||
43 | /** |
||
44 | * StorableJWKSet constructor. |
||
45 | * |
||
46 | * @param string $filename |
||
47 | * @param array $parameters |
||
48 | * @param int $nb_keys |
||
49 | */ |
||
50 | public function __construct($filename, array $parameters, $nb_keys) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function current() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function next() |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function key() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function valid() |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function rewind() |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function offsetExists($offset) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function offsetGet($offset) |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function offsetSet($offset, $value) |
||
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | public function offsetUnset($offset) |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function getKey($index) |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function hasKey($index) |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function getKeys() |
||
156 | |||
157 | /** |
||
158 | * {@inheritdoc} |
||
159 | */ |
||
160 | public function addKey(JWKInterface $key) |
||
164 | |||
165 | /** |
||
166 | * {@inheritdoc} |
||
167 | */ |
||
168 | public function removeKey($index) |
||
172 | |||
173 | /** |
||
174 | * {@inheritdoc} |
||
175 | */ |
||
176 | public function countKeys() |
||
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | public function selectKey($type, $algorithm = null, array $restrictions = []) |
||
188 | |||
189 | /** |
||
190 | * {@inheritdoc} |
||
191 | */ |
||
192 | public function count() |
||
196 | |||
197 | /** |
||
198 | * {@inheritdoc} |
||
199 | */ |
||
200 | public function jsonSerialize() |
||
201 | { |
||
202 | return $this->getJWKSet()->jsonSerialize(); |
||
203 | } |
||
204 | |||
205 | /** |
||
206 | * @return string |
||
207 | */ |
||
208 | protected function getFilename() |
||
209 | { |
||
210 | return $this->filename; |
||
211 | } |
||
212 | |||
213 | /** |
||
214 | * @return \Jose\Object\JWKSetInterface |
||
215 | */ |
||
216 | protected function getJWKSet() |
||
222 | |||
223 | /** |
||
224 | * This function loads or creates it the file if needed |
||
225 | */ |
||
226 | protected function loadJWKSetIfNeeded() |
||
235 | |||
236 | /** |
||
237 | * This function returns the content of the file only if it is an array |
||
238 | * |
||
239 | * @return null|array |
||
240 | */ |
||
241 | protected function getFileContent() |
||
257 | |||
258 | /** |
||
259 | * This method creates the JWKSet and populate it with keys |
||
260 | */ |
||
261 | protected function createJWKSet() |
||
271 | |||
272 | /** |
||
273 | * @return \Jose\Object\JWKInterface |
||
274 | */ |
||
275 | protected function createJWK() |
||
282 | |||
283 | /** |
||
284 | * This method saves the JWKSet in the file. |
||
285 | */ |
||
286 | protected function save() |
||
291 | } |
||
292 |
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..