| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function leaveNode(Node $node) |
||
| 49 | { |
||
| 50 | if ($node instanceof Node\Stmt\Class_) { |
||
| 51 | $method = new Builder\Method($this->name); |
||
| 52 | $method->makePublic(); |
||
| 53 | $method->addStmt(new Node\Stmt\Return_(resolveMethodCall( |
||
| 54 | 'this', |
||
| 55 | $this->resolverProperty, |
||
| 56 | $this->name |
||
| 57 | ))); |
||
| 58 | if ($this->returnType !== null) { |
||
| 59 | $method->setReturnType($this->returnType); |
||
| 60 | } |
||
| 61 | $method->setDocComment(PHPDoc::writeInheritdoc()); |
||
| 62 | |||
| 63 | $node->stmts[] = $method->getNode(); |
||
| 64 | } |
||
| 65 | |||
| 66 | return null; |
||
| 67 | } |
||
| 68 | } |
||
| 69 |