| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class PhpUtils { |
||
| 6 | static private string $delimiter = '---'; |
||
| 7 | static private array $parsedJs = []; |
||
| 8 | |||
| 9 | public static function importFromFile(string $filename, string $extension): string { |
||
| 10 | return \file_get_contents($filename . '.' . $extension, true); |
||
| 11 | } |
||
| 12 | |||
| 13 | public static function parseFile(string $filename, string $extension): array { |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function getParsedJs(string $name): string { |
||
| 28 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: