Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.1481 |
Changes | 0 |
1 | <?php |
||
41 | 4 | public function getNodes(string $className) : array |
|
42 | { |
||
43 | 4 | $fileName = $this->reflectionClassLocator->locate($className); |
|
44 | try { |
||
45 | 3 | $ast = $this->astParser->parse(file_get_contents($fileName)); |
|
46 | } catch (Error $error) { |
||
47 | throw new ParseErrorException("File Parser error: {$error->getMessage()}"); |
||
48 | } |
||
49 | |||
50 | 3 | return $ast; |
|
51 | } |
||
52 | } |
||
53 |