1 | <?php |
||
30 | final class Loader implements LoaderInterface |
||
31 | { |
||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public static function loadAndDecryptUsingKey($input, JWKInterface $jwk, array $allowed_algorithms, LoggerInterface $logger = null) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public static function loadAndDecryptUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public static function loadAndVerifySignatureUsingKey($input, JWKInterface $jwk, array $allowed_algorithms, LoggerInterface $logger = null) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public static function loadAndVerifySignatureUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public static function loadAndVerifySignatureUsingKeyAndDetachedPayload($input, JWKInterface $jwk, array $allowed_algorithms, $detached_payload, LoggerInterface $logger = null) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public static function loadAndVerifySignatureUsingKeySetAndDetachedPayload($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload, LoggerInterface $logger = null) |
||
88 | |||
89 | /** |
||
90 | * @param string $input |
||
91 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
92 | * @param array $allowed_algorithms |
||
93 | * @param \Psr\Log\LoggerInterface|null $logger |
||
94 | * |
||
95 | * @return \Jose\Object\JWEInterface |
||
96 | */ |
||
97 | private static function loadAndDecrypt($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
107 | |||
108 | /** |
||
109 | * @param string $input |
||
110 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
111 | * @param array $allowed_algorithms |
||
112 | * @param string|null $detached_payload |
||
113 | * @param \Psr\Log\LoggerInterface|null $logger |
||
114 | * |
||
115 | * @return \Jose\Object\JWSInterface |
||
116 | */ |
||
117 | private static function loadAndVerifySignature($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload = null, LoggerInterface $logger = null) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public static function load($input) |
||
141 | |||
142 | /** |
||
143 | * @param string $input |
||
144 | * |
||
145 | * @return array |
||
146 | */ |
||
147 | private static function convert($input) |
||
162 | |||
163 | /** |
||
164 | * @param $input |
||
165 | * |
||
166 | * @return array |
||
167 | */ |
||
168 | private static function fromFlattenedSerializationRecipientToSerialization($input) |
||
188 | |||
189 | /** |
||
190 | * @param $input |
||
191 | * |
||
192 | * @return array |
||
193 | */ |
||
194 | private static function fromFlattenedSerializationSignatureToSerialization($input) |
||
213 | |||
214 | /** |
||
215 | * @param string $input |
||
216 | * |
||
217 | * @return array |
||
218 | */ |
||
219 | private static function fromCompactSerializationToSerialization($input) |
||
231 | |||
232 | /** |
||
233 | * @param array $parts |
||
234 | * |
||
235 | * @return array |
||
236 | */ |
||
237 | private static function fromCompactSerializationRecipientToSerialization(array $parts) |
||
255 | |||
256 | /** |
||
257 | * @param array $parts |
||
258 | * |
||
259 | * @return array |
||
260 | */ |
||
261 | private static function fromCompactSerializationSignatureToSerialization(array $parts) |
||
275 | } |
||
276 |
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.