1 | <?php |
||
21 | class StaticVariablesCollector extends NodeVisitorAbstract |
||
22 | { |
||
23 | /** |
||
24 | * Reflection context, eg. ReflectionClass, ReflectionMethod, etc |
||
25 | * |
||
26 | * @var mixed |
||
27 | */ |
||
28 | private $context; |
||
29 | |||
30 | private $staticVariables = []; |
||
31 | |||
32 | /** |
||
33 | * Default constructor |
||
34 | * |
||
35 | * @param mixed $context Reflection context, eg. ReflectionClass, ReflectionMethod, etc |
||
36 | */ |
||
37 | 2 | public function __construct($context) |
|
38 | { |
||
39 | 2 | $this->context = $context; |
|
40 | 2 | } |
|
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | 2 | public function enterNode(Node $node) |
|
70 | |||
71 | /** |
||
72 | * Returns an associative map of static variables in the method/function body |
||
73 | * |
||
74 | * @return array |
||
75 | */ |
||
76 | 2 | public function getStaticVariables() |
|
80 | } |
||
81 |