| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class XliffVersionDetector { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | private static array $versions_1 = [ '1.0', '1.1', '1.2' ]; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private static array $versions_2 = [ '2.0', '2.1' ]; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $xliffContent |
||
| 21 | * |
||
| 22 | * @return int |
||
| 23 | * @throws NotSupportedVersionException |
||
| 24 | * @throws NotValidFileException |
||
| 25 | */ |
||
| 26 | public static function detect( string $xliffContent ): int { |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $version |
||
| 40 | * |
||
| 41 | * @return int |
||
| 42 | * @throws NotSupportedVersionException |
||
| 43 | */ |
||
| 44 | private static function resolveVersion( string $version ): int { |
||
| 56 |