Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9955 | 6 | public static function string_has_bom(string $str): bool |
|
9956 | { |
||
9957 | /** @noinspection PhpUnusedLocalVariableInspection */ |
||
9958 | 6 | foreach (self::$BOM as $bom_string => &$bom_byte_length) { |
|
9959 | 6 | if (\strncmp($str, $bom_string, $bom_byte_length) === 0) { |
|
9960 | 6 | return true; |
|
9961 | } |
||
9962 | } |
||
9963 | |||
9964 | 6 | return false; |
|
9965 | } |
||
14812 |