| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.0078 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 4 | public function parse(string $filePath): ClassDependencies |
|
| 20 | { |
||
| 21 | 4 | $classDependencies = new ClassDependencies($filePath); |
|
| 22 | |||
| 23 | 4 | $fileAst = $this->parser->parse((string) file_get_contents($filePath)); |
|
| 24 | |||
| 25 | 4 | if ($fileAst === null) { |
|
| 26 | return $classDependencies; |
||
| 27 | } |
||
| 28 | |||
| 29 | 4 | $traverser = $this->traverserFactory->createTraverser($classDependencies); |
|
| 30 | 4 | $traverser->traverse($fileAst); |
|
| 31 | |||
| 32 | 4 | return $classDependencies; |
|
| 33 | } |
||
| 35 |