Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
1860 | 2 | public static function file_has_bom(string $file_path): bool |
|
1861 | { |
||
1862 | 2 | $file_content = \file_get_contents($file_path); |
|
1863 | 2 | if ($file_content === false) { |
|
1864 | throw new \RuntimeException('file_get_contents() returned false for:' . $file_path); |
||
1865 | } |
||
1866 | |||
1867 | 2 | return self::string_has_bom($file_content); |
|
1868 | } |
||
13706 |