(Node $node)
| 39 | } |
| 40 | |
| 41 | public function enterNode(Node $node) |
| 42 | { |
| 43 | // Use a stack to keep track of the current parent node |
| 44 | // This is needed to set the parent attribute of the nodes |
| 45 | if (!empty($this->stack)) { |
| 46 | $node->setAttribute('parent', end($this->stack)); |
| 47 | } |
| 48 | |
| 49 | $this->stack[] = $node; |
| 50 | |
| 51 | // Extract file imports |
| 52 | if ($node instanceof Use_) { |
| 53 | $this->extractImport($node); |
| 54 | } |
| 55 | |
| 56 | // Locate the current class |
| 57 | if ($node instanceof Class_) { |
| 58 | $this->currentClass = $node; |
| 59 | |
| 60 | $this->extractClass($node); |
| 61 | } |
| 62 | |
| 63 | // Extract class use traits |
| 64 | if ($node instanceof Node\Stmt\TraitUse) { |
| 65 | $this->extractClassUseTrait($node); |
| 66 | } |
| 67 | |
| 68 | // Extract class properties |
| 69 | if ($node instanceof Property) { |
| 70 | $this->extractClassProperty($node); |
| 71 | } |
| 72 | |
| 73 | // Extract class methods |
| 74 | if ($node instanceof ClassMethod) { |
| 75 | $this->extractClassMethod($node); |
| 76 | } |
| 77 | |
| 78 | // Extract removed methods from comments like "// removed_method:method_name" |
| 79 | if ($node instanceof Node\Stmt\Nop) { |
| 80 | $this->extractRemovedMethod($node); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | public function extractImport($node) |
| 85 | { |
nothing calls this directly
no test coverage detected