Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function leaveNode(Node $node) |
||
31 | { |
||
32 | if ($node instanceof Node\Stmt\Class_) { |
||
33 | $method = new Builder\Method($this->name); |
||
34 | $method->makePublic(); |
||
35 | $method->addStmt(new Node\Stmt\Return_(Expressions::resolveMethodCall('this', $this->resolverProperty, $this->name))); |
||
36 | if ($this->returnType !== null) { |
||
37 | $method->setReturnType($this->returnType); |
||
38 | } |
||
39 | $method->setDocComment(PHPDoc::writeInheritdoc()); |
||
40 | |||
41 | $node->stmts[] = $method->getNode(); |
||
42 | } |
||
43 | |||
44 | return null; |
||
45 | } |
||
46 | } |