| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 24 | 1 | public static function parseFile(string $filename, string $extension): array { |
|
| 25 | 1 | $pattern = '/\/\/' . self::$delimiter . '{3,}(.+?)' . self::$delimiter . '{3,}(.+?)\/\/' . self::$delimiter . '{3,}end' . self::$delimiter . '{3,}/s'; |
|
| 26 | 1 | $templateString = self::importFromFile($filename, $extension); |
|
| 27 | 1 | \preg_match_all($pattern, $templateString, $templateArray); |
|
| 28 | 1 | $iterationNumber = \count($templateArray[0]); |
|
| 29 | 1 | for ($i = 0; $i < $iterationNumber; $i++) { |
|
| 30 | 1 | self::$parsedJs[$templateArray[1][$i]] = $templateArray[2][$i]; |
|
| 31 | } |
||
| 32 | 1 | return $templateArray; |
|
| 33 | } |
||
| 44 |