| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function create(array $aliases): CompressionMethodManager |
||
| 45 | { |
||
| 46 | $compressionMethods = []; |
||
| 47 | foreach ($aliases as $alias) { |
||
| 48 | if (array_key_exists($alias, $this->compressionMethods)) { |
||
| 49 | $compressionMethods[] = $this->compressionMethods[$alias]; |
||
| 50 | } else { |
||
| 51 | throw new \InvalidArgumentException(sprintf('The compression method with the alias "%s" is not supported.', $alias)); |
||
| 52 | } |
||
| 53 | } |
||
| 54 | |||
| 55 | return CompressionMethodManager::create($compressionMethods); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |