| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 31 | public function loadScript(Script $script): array |
||
| 32 | { |
||
| 33 | $content = $this->loadFileContents($script->getPath()); |
||
| 34 | |||
| 35 | foreach ($this->parsers as $parser) { |
||
| 36 | try { |
||
| 37 | return $parser->parseContent($content, $script); |
||
| 38 | } catch (ScriptNotSupportedByParser $e) { |
||
| 39 | //nth |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | throw new ScriptNotSupportedByParser('Can not find a parser able to parse ' . $script->getPath()); |
||
| 44 | } |
||
| 45 | |||
| 55 |