1 | <?php |
||
19 | class LocationImpl implements Location { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $file_name; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $file_content; |
||
29 | |||
30 | /** |
||
31 | * @var int[]|null |
||
32 | */ |
||
33 | protected $running_line_length = null; |
||
34 | |||
35 | /** |
||
36 | * @var mixed|null |
||
37 | */ |
||
38 | protected $file = null; |
||
39 | |||
40 | /** |
||
41 | * @var mixed|null |
||
42 | */ |
||
43 | protected $namespace = null; |
||
44 | |||
45 | /** |
||
46 | * @var mixed|null |
||
47 | */ |
||
48 | protected $class_interface_trait = null; |
||
49 | |||
50 | /** |
||
51 | * @var mixed[] |
||
52 | */ |
||
53 | protected $function_method = []; |
||
54 | |||
55 | /** |
||
56 | * @var \PhpParser\Node|null |
||
57 | */ |
||
58 | protected $current_node = null; |
||
59 | |||
60 | 63 | public function __construct($file_name, $file_content) { |
|
66 | |||
67 | /** |
||
68 | * @inheritdocs |
||
69 | */ |
||
70 | 55 | public function _file() { |
|
73 | |||
74 | /** |
||
75 | * @inheritdocs |
||
76 | */ |
||
77 | 54 | public function _namespace() { |
|
80 | |||
81 | /** |
||
82 | * @inheritdocs |
||
83 | */ |
||
84 | 43 | public function _class_interface_trait() { |
|
87 | |||
88 | /** |
||
89 | * @inheritdocs |
||
90 | */ |
||
91 | 27 | public function _function_method() { |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 53 | public function _file_name() { |
|
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | 53 | public function _file_content() { |
|
113 | |||
114 | /** |
||
115 | * @return int |
||
116 | */ |
||
117 | 25 | public function _line() { |
|
121 | |||
122 | /** |
||
123 | * @return int |
||
124 | */ |
||
125 | 12 | public function _column() { |
|
134 | |||
135 | /** |
||
136 | * Push an entity on the stack. |
||
137 | * |
||
138 | * @param string $type |
||
139 | * @param mixed $handle |
||
140 | * @return null |
||
141 | */ |
||
142 | 56 | public function push_entity($type, $handle) { |
|
159 | |||
160 | /** |
||
161 | * Pop an entity from the stach |
||
162 | * |
||
163 | * @return null |
||
164 | */ |
||
165 | 53 | public function pop_entity() { |
|
182 | |||
183 | /** |
||
184 | * @param \PhpParser\Node $node |
||
185 | * @return null |
||
186 | */ |
||
187 | 55 | public function set_current_node(\PhpParser\Node $node) { |
|
191 | |||
192 | /** |
||
193 | * @return \PhpParser\Node $node |
||
194 | */ |
||
195 | 53 | public function current_node() { |
|
199 | |||
200 | /** |
||
201 | * @return null |
||
202 | */ |
||
203 | 52 | public function flush_current_node() { |
|
207 | |||
208 | 13 | protected function init_running_line_length() { |
|
221 | } |
||
222 | |||
223 |