Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function create(array $aliases): JWAManager |
||
38 | { |
||
39 | $algorithms = []; |
||
40 | foreach ($aliases as $alias) { |
||
41 | if (array_key_exists($alias, $this->algorithms)) { |
||
42 | $algorithms[] = $this->algorithms[$alias]; |
||
43 | } else { |
||
44 | throw new \InvalidArgumentException(sprintf('The algorithm with the alias "%s" is not supported.', $alias)); |
||
45 | } |
||
46 | } |
||
47 | |||
48 | return JWAManager::create($algorithms); |
||
49 | } |
||
50 | } |
||
51 |