Lines Matching refs:node
38 public function __construct(Node $node, string $name, ?Node $arguments, int $lineno) argument
40 if ($node instanceof NameExpression) {
41 $node->setAttribute('is_defined_test', true);
42 } elseif ($node instanceof GetAttrExpression) {
43 $node->setAttribute('is_defined_test', true);
44 $this->changeIgnoreStrictCheck($node);
45 } elseif ($node instanceof BlockReferenceExpression) {
46 $node->setAttribute('is_defined_test', true);
47 … } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) {
48 $node->setAttribute('is_defined_test', true);
49 } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) {
50 $node = new ConstantExpression(true, $node->getTemplateLine());
51 } elseif ($node instanceof MethodCallExpression) {
52 $node->setAttribute('is_defined_test', true);
57 parent::__construct($node, $name, $arguments, $lineno);
60 private function changeIgnoreStrictCheck(GetAttrExpression $node) argument
62 $node->setAttribute('optimizable', false);
63 $node->setAttribute('ignore_strict_check', true);
65 if ($node->getNode('node') instanceof GetAttrExpression) {
66 $this->changeIgnoreStrictCheck($node->getNode('node'));