Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function parse(Node $nodeToParse, NodeInterface $node): NodeInterface |
||
25 | { |
||
26 | /** |
||
27 | * Overriding variable types. |
||
28 | * @var Node\Stmt\Namespace_ $nodeToParse The namespace node to parse. |
||
29 | * @var PhpFileModelInterface $node The node which contains this namespace. |
||
30 | */ |
||
31 | if (Validator::instance(Node\Name::class)->validate($nodeToParse->name)) { |
||
32 | $node->setNamespace($nodeToParse->name->parts); |
||
33 | } |
||
34 | |||
35 | return $node; |
||
36 | } |
||
37 | } |