Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
50 | 4 | public static function algoByHeader(Header $header): CompressionAlgorithm |
|
51 | { |
||
52 | 4 | if (!$header->hasCompressionAlgorithm()) { |
|
53 | 1 | throw new \UnexpectedValueException( |
|
54 | 1 | 'No compression algorithm parameter.'); |
|
55 | } |
||
56 | 3 | return self::algoByName($header->compressionAlgorithm()->value()); |
|
57 | } |
||
59 |