src/Visitor/AddResolverProperty.php 1 location
|
@@ 36-43 (lines=8) @@
|
| 33 |
|
/** |
| 34 |
|
* {@inheritdoc} |
| 35 |
|
*/ |
| 36 |
|
public function leaveNode(Node $node) |
| 37 |
|
{ |
| 38 |
|
if ($node instanceof Node\Stmt\Class_) { |
| 39 |
|
$node->stmts = Utils::injectValues($node->stmts, $this->definePlacementID($node), [$this->buildProperty()]); |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
return null; |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
private function definePlacementID(Node\Stmt\Class_ $node): int |
| 46 |
|
{ |
src/Visitor/AddUnsetPropertiesConst.php 1 location
|
@@ 30-37 (lines=8) @@
|
| 27 |
|
/** |
| 28 |
|
* {@inheritdoc} |
| 29 |
|
*/ |
| 30 |
|
public function leaveNode(Node $node) |
| 31 |
|
{ |
| 32 |
|
if ($node instanceof Node\Stmt\Class_) { |
| 33 |
|
$node->stmts = Utils::injectValues($node->stmts, $this->definePlacementID($node), [$this->buildProperty()]); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
return null; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
private function definePlacementID(Node\Stmt\Class_ $node): int |
| 40 |
|
{ |