Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function create(array $aliases): HeaderCheckerManager |
||
29 | { |
||
30 | $checkers = []; |
||
31 | foreach ($aliases as $alias) { |
||
32 | if (array_key_exists($alias, $this->checkers)) { |
||
33 | $checkers[] = $this->checkers[$alias]; |
||
34 | } else { |
||
35 | throw new \InvalidArgumentException(sprintf('The header checker with the alias "%s" is not supported.', $alias)); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | return HeaderCheckerManager::create($checkers); |
||
40 | } |
||
41 | |||
60 |