| Total Complexity | 12 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Util |
||
| 6 | { |
||
| 7 | 17 | public function __construct() |
|
| 8 | { |
||
| 9 | 17 | defined('UTF8_BOM') || define('UTF8_BOM', chr(0xEF).chr(0xBB).chr(0xBF)); |
|
| 10 | 17 | defined('UTF16_LITTLE_ENDIAN_BOM') || define('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF).chr(0xFE)); |
|
| 11 | 17 | defined('UTF16_BIG_ENDIAN_BOM') || define('UTF16_BIG_ENDIAN_BOM', chr(0xFE).chr(0xFF)); |
|
| 12 | 17 | defined('UTF32_LITTLE_ENDIAN_BOM') || define('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF).chr(0xFE).chr(0x00).chr(0x00)); |
|
| 13 | 17 | defined('UTF32_BIG_ENDIAN_BOM') || define('UTF32_BIG_ENDIAN_BOM', chr(0x00).chr(0x00).chr(0xFE).chr(0xFF)); |
|
| 14 | 17 | } |
|
| 15 | |||
| 16 | /** |
||
| 17 | * Detects higher UTF encoded strings. |
||
| 18 | */ |
||
| 19 | 17 | public function detectUTFEncoding(string $str): ?string |
|
| 41 | } |
||
| 42 | } |
||
| 43 |