1 | <?php |
||
27 | final class Loader implements LoaderInterface |
||
28 | { |
||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function loadAndDecryptUsingKey($input, JWKInterface $jwk, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, &$recipient_index = null) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function loadAndDecryptUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, &$recipient_index = null) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function loadAndVerifySignatureUsingKey($input, JWKInterface $jwk, array $allowed_algorithms, &$signature_index = null) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function loadAndVerifySignatureUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_algorithms, &$signature_index = null) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function loadAndVerifySignatureUsingKeyAndDetachedPayload($input, JWKInterface $jwk, array $allowed_algorithms, $detached_payload, &$signature_index = null) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function loadAndVerifySignatureUsingKeySetAndDetachedPayload($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload, &$signature_index = null) |
||
85 | |||
86 | /** |
||
87 | * @param string $input |
||
88 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
89 | * @param array $allowed_key_encryption_algorithms |
||
90 | * @param array $allowed_content_encryption_algorithms |
||
91 | * @param null|int $recipient_index |
||
92 | * |
||
93 | * @return \Jose\Object\JWEInterface |
||
94 | */ |
||
95 | private function loadAndDecrypt($input, JWKSetInterface $jwk_set, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, &$recipient_index = null) |
||
105 | |||
106 | /** |
||
107 | * @param string $input |
||
108 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
109 | * @param array $allowed_algorithms |
||
110 | * @param string|null $detached_payload |
||
111 | * @param null|int $signature_index |
||
112 | * |
||
113 | * @return \Jose\Object\JWSInterface |
||
114 | */ |
||
115 | private function loadAndVerifySignature($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload = null, &$signature_index = null) |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | public function load($input) |
||
141 | |||
142 | /** |
||
143 | * @param string $input |
||
144 | * |
||
145 | * @return array |
||
146 | */ |
||
147 | private function convert($input) |
||
166 | |||
167 | /** |
||
168 | * @param $input |
||
169 | * |
||
170 | * @return array |
||
171 | */ |
||
172 | private function fromFlattenedSerializationRecipientToSerialization($input) |
||
193 | |||
194 | /** |
||
195 | * @param $input |
||
196 | * |
||
197 | * @return array |
||
198 | */ |
||
199 | private function fromFlattenedSerializationSignatureToSerialization($input) |
||
219 | |||
220 | /** |
||
221 | * @param string $input |
||
222 | * |
||
223 | * @return array |
||
224 | */ |
||
225 | private function fromCompactSerializationToSerialization($input) |
||
239 | |||
240 | /** |
||
241 | * @param array $parts |
||
242 | * |
||
243 | * @return array |
||
244 | */ |
||
245 | private function fromCompactSerializationRecipientToSerialization(array $parts) |
||
264 | |||
265 | /** |
||
266 | * @param array $parts |
||
267 | * |
||
268 | * @return array |
||
269 | */ |
||
270 | private function fromCompactSerializationSignatureToSerialization(array $parts) |
||
285 | } |
||
286 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.