| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | 7 | public function __invoke(Traversable $files): Traversable |
|
| 36 | { |
||
| 37 | 7 | foreach ($files as $file) { |
|
| 38 | 7 | $stmts = $this->parser->parse(file_get_contents($file), $this->errorHandler); |
|
| 39 | |||
| 40 | 6 | if ($stmts === null) { |
|
| 41 | throw new RuntimeException(sprintf("Parsing the file [%s] resulted in an error.", $file)); |
||
| 42 | } |
||
| 43 | |||
| 44 | 6 | yield $stmts; |
|
| 45 | } |
||
| 48 |