Conditions | 5 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function invoke($node, NodeInterface $parent): void |
||
37 | { |
||
38 | if (! $node instanceof Node\Stmt\Use_ || ! $parent instanceof PhpFileModelInterface) { |
||
39 | throw new Exception('UseNodeParser is made to parse a use node'); |
||
40 | } |
||
41 | |||
42 | if ($node->type === Node\Stmt\Use_::TYPE_NORMAL) { |
||
43 | foreach ($node->uses as $use) { |
||
44 | $parent->addUse($use->getAlias()->name, $use->name->toString()); |
||
45 | } |
||
49 |