Lines Matching refs:Node

6 use PhpParser\Node\Identifier;
7 use PhpParser\Node\Name\FullyQualified;
8 use PhpParser\Node\Scalar;
9 use PhpParser\Node\Stmt;
10 use PhpParser\Node\Expr;
17 $attribute = new Node\Attribute(new Node\Name('Test'));
26 $stmt = new Node\Stmt\Class_('Class');
36 BuilderHelpers::normalizeStmt(new Node\Attribute(new Node\Name('Test')));
46 $identifier = new Node\Identifier('fn');
56 $identifier = new Node\Identifier('fn');
69 $name = new Node\Name('test');
72 new Node\Name\FullyQualified(['Namespace', 'Test']),
76 new Node\Name\Relative(['Test']),
96 $name = new Node\Name('test');
99 new Node\Name\FullyQualified(['Namespace', 'Test']),
103 new Node\Name\Relative(['Test']),
120 $this->assertEquals(new Node\Identifier('array'), BuilderHelpers::normalizeType('array'));
121 … $this->assertEquals(new Node\Identifier('callable'), BuilderHelpers::normalizeType('callable'));
122 $this->assertEquals(new Node\Identifier('string'), BuilderHelpers::normalizeType('string'));
123 $this->assertEquals(new Node\Identifier('int'), BuilderHelpers::normalizeType('int'));
124 $this->assertEquals(new Node\Identifier('float'), BuilderHelpers::normalizeType('float'));
125 $this->assertEquals(new Node\Identifier('bool'), BuilderHelpers::normalizeType('bool'));
126 … $this->assertEquals(new Node\Identifier('iterable'), BuilderHelpers::normalizeType('iterable'));
127 $this->assertEquals(new Node\Identifier('void'), BuilderHelpers::normalizeType('void'));
128 $this->assertEquals(new Node\Identifier('object'), BuilderHelpers::normalizeType('object'));
129 $this->assertEquals(new Node\Identifier('null'), BuilderHelpers::normalizeType('null'));
130 $this->assertEquals(new Node\Identifier('false'), BuilderHelpers::normalizeType('false'));
131 $this->assertEquals(new Node\Identifier('mixed'), BuilderHelpers::normalizeType('mixed'));
132 $this->assertEquals(new Node\Identifier('never'), BuilderHelpers::normalizeType('never'));
133 $this->assertEquals(new Node\Identifier('true'), BuilderHelpers::normalizeType('true'));
135 $intIdentifier = new Node\Identifier('int');
138 $intName = new Node\Name('int');
141 $intNullable = new Node\NullableType(new Identifier('int'));
144 … $unionType = new Node\UnionType([new Node\Identifier('int'), new Node\Identifier('string')]);
147 $intersectionType = new Node\IntersectionType([new Node\Name('A'), new Node\Name('B')]);
150 $expectedNullable = new Node\NullableType($intIdentifier);
182 …$this->assertEquals(new Expr\ConstFetch(new Node\Name('null')), BuilderHelpers::normalizeValue(nul…
183 …$this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(tru…
184 …$this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(fa…
190 new Node\ArrayItem(new Scalar\Int_(0)),
191 new Node\ArrayItem(new Scalar\Int_(1), new Scalar\String_('test')),
216 $attribute = new Node\Attribute(new Node\Name('Test'));
217 $attributeGroup = new Node\AttributeGroup([$attribute]);