1 | <?php |
||
15 | class Context |
||
16 | { |
||
17 | /** |
||
18 | * For FunctionDefinition it's null, use scopePointer |
||
19 | * |
||
20 | * @var ParentDefinition|null |
||
21 | */ |
||
22 | public $scope; |
||
23 | |||
24 | /** |
||
25 | * @var AliasManager |
||
26 | */ |
||
27 | public $aliasManager; |
||
28 | |||
29 | /** |
||
30 | * @var Application |
||
31 | */ |
||
32 | public $application; |
||
33 | |||
34 | /** |
||
35 | * @var string|integer |
||
36 | */ |
||
37 | public $currentBranch; |
||
38 | |||
39 | /** |
||
40 | * @var OutputInterface |
||
41 | */ |
||
42 | public $output; |
||
43 | |||
44 | /** |
||
45 | * @var Variable[] |
||
46 | */ |
||
47 | protected $symbols = array(); |
||
48 | |||
49 | /** |
||
50 | * @var ScopePointer|null |
||
51 | */ |
||
52 | public $scopePointer; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $filepath; |
||
58 | |||
59 | /** |
||
60 | * @var EventManager |
||
61 | */ |
||
62 | protected $eventManager; |
||
63 | |||
64 | /** |
||
65 | * Construct our Context with all needed information |
||
66 | * |
||
67 | * @param OutputInterface $output |
||
68 | * @param Application $application |
||
69 | * @param EventManager $eventManager |
||
70 | */ |
||
71 | public function __construct(OutputInterface $output, Application $application, EventManager $eventManager) |
||
79 | |||
80 | /** |
||
81 | * @return Expression |
||
82 | */ |
||
83 | public function getExpressionCompiler() |
||
87 | |||
88 | public function initGlobals() |
||
103 | |||
104 | /** |
||
105 | * @param string $name |
||
106 | * @return Variable |
||
107 | */ |
||
108 | public function addSymbol($name) |
||
115 | |||
116 | /** |
||
117 | * @param Variable $variable |
||
118 | * @return bool |
||
119 | */ |
||
120 | public function addVariable(Variable $variable) |
||
126 | |||
127 | /** |
||
128 | * Clear prevent context |
||
129 | */ |
||
130 | public function clear() |
||
140 | |||
141 | public function clearSymbols() |
||
146 | |||
147 | public function dump() |
||
154 | |||
155 | /** |
||
156 | * @param $name |
||
157 | * @return Variable|null |
||
158 | */ |
||
159 | public function getSymbol($name) |
||
163 | |||
164 | /** |
||
165 | * @param string $type |
||
166 | * @param string $message |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function warning($type, $message) |
||
178 | |||
179 | /** |
||
180 | * @param string $type |
||
181 | * @param string $message |
||
182 | * @param \PhpParser\NodeAbstract $expr |
||
183 | * @param int $status |
||
184 | * @return bool |
||
185 | */ |
||
186 | public function notice($type, $message, \PhpParser\NodeAbstract $expr, $status = Check::CHECK_SAFE) |
||
213 | |||
214 | /** |
||
215 | * @param \PhpParser\Error $exception |
||
216 | * @param string $filepath |
||
217 | * @return bool |
||
218 | */ |
||
219 | public function sytaxError(\PhpParser\Error $exception, $filepath) |
||
234 | |||
235 | /** |
||
236 | * @return Variable[] |
||
237 | */ |
||
238 | public function getSymbols() |
||
242 | |||
243 | /** |
||
244 | * @param AbstractDefinition $scope |
||
245 | */ |
||
246 | public function setScope(AbstractDefinition $scope = null) |
||
250 | |||
251 | public function debug($message, \PhpParser\Node $expr = null) |
||
264 | |||
265 | /** |
||
266 | * @return string |
||
267 | */ |
||
268 | public function getFilepath() |
||
272 | |||
273 | /** |
||
274 | * @param string $filepath |
||
275 | */ |
||
276 | public function setFilepath($filepath) |
||
280 | |||
281 | /** |
||
282 | * @return int|string |
||
283 | */ |
||
284 | public function getCurrentBranch() |
||
288 | |||
289 | /** |
||
290 | * @param int|string $currentBranch |
||
291 | */ |
||
292 | public function setCurrentBranch($currentBranch) |
||
296 | } |
||
297 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.