/PHP-Parser/test/PhpParser/ |
H A D | NameContextTest.php | 6 use PhpParser\Node\Stmt\Use_; alias 37 [Use_::TYPE_NORMAL, 'Test', ['\Test']], 39 [Use_::TYPE_NORMAL, 'NS\Test', ['\NS\Test', 'Test']], 41 [Use_::TYPE_NORMAL, 'NS\Foo\Bar', ['\NS\Foo\Bar']], 42 [Use_::TYPE_NORMAL, 'ns\foo\Bar', ['\ns\foo\Bar']], 43 [Use_::TYPE_NORMAL, 'Foo', ['\Foo', 'Foo']], 55 [Use_::TYPE_NORMAL, 'self', ['self']], 56 [Use_::TYPE_NORMAL, 'parent', ['parent']], 57 [Use_::TYPE_NORMAL, 'static', ['static']], 59 [Use_::TYPE_CONSTANT, 'true', ['\true', 'true']], [all …]
|
H A D | BuilderFactoryTest.php | 34 ['use', Builder\Use_::class], 35 ['useFunction', Builder\Use_::class], 36 ['useConst', Builder\Use_::class],
|
/PHP-Parser/test/PhpParser/Builder/ |
H A D | UseTest.php | 10 protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) { 11 return new Builder\Use_($name, $type); 16 $this->assertEquals(new Stmt\Use_([ 21 $this->assertEquals(new Stmt\Use_([ 25 $node = $this->createUseBuilder('foo\bar', Stmt\Use_::TYPE_FUNCTION)->as('foo')->getNode(); 26 $this->assertEquals(new Stmt\Use_([ 28 ], Stmt\Use_::TYPE_FUNCTION), $node); 30 $node = $this->createUseBuilder('foo\BAR', Stmt\Use_::TYPE_CONSTANT)->as('FOO')->getNode(); 31 $this->assertEquals(new Stmt\Use_([ 33 ], Stmt\Use_::TYPE_CONSTANT), $node);
|
/PHP-Parser/lib/PhpParser/ |
H A D | NameContext.php | 41 Stmt\Use_::TYPE_NORMAL => [], 42 Stmt\Use_::TYPE_FUNCTION => [], 43 Stmt\Use_::TYPE_CONSTANT => [], 57 if ($type === Stmt\Use_::TYPE_CONSTANT) { 65 Stmt\Use_::TYPE_NORMAL => '', 66 Stmt\Use_::TYPE_FUNCTION => 'function ', 67 Stmt\Use_::TYPE_CONSTANT => 'const ', 145 return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); 159 if ($type === Stmt\Use_::TYPE_NORMAL) { 187 if ($type === Stmt\Use_::TYPE_CONSTANT) { [all …]
|
H A D | BuilderFactory.php | 11 use PhpParser\Node\Stmt\Use_; alias 161 public function use($name): Builder\Use_ { 162 return new Builder\Use_($name, Use_::TYPE_NORMAL); 172 public function useFunction($name): Builder\Use_ { 173 return new Builder\Use_($name, Use_::TYPE_FUNCTION); 183 public function useConst($name): Builder\Use_ { 184 return new Builder\Use_($name, Use_::TYPE_CONSTANT);
|
H A D | NodeDumper.php | 12 use PhpParser\Node\Stmt\Use_; alias 94 … && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { 224 Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', 225 Use_::TYPE_NORMAL => 'TYPE_NORMAL', 226 Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', 227 Use_::TYPE_CONSTANT => 'TYPE_CONSTANT',
|
/PHP-Parser/lib/PhpParser/Node/ |
H A D | UseItem.php | 7 use PhpParser\Node\Stmt\Use_; alias 11 …* @var Use_::TYPE_* One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for… 24 * @param Use_::TYPE_* $type Type of the use element (for mixed group use only) 27 …public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array …
|
/PHP-Parser/lib/PhpParser/Node/Stmt/ |
H A D | GroupUse.php | 11 * @var Use_::TYPE_* Type of group use 24 * @param Use_::TYPE_* $type Type of group use 27 …public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attri…
|
H A D | Use_.php | 8 class Use_ extends Stmt { class
|
/PHP-Parser/lib/PhpParser/Builder/ |
H A D | Use_.php | 10 class Use_ implements Builder { class 45 return new Stmt\Use_([
|
/PHP-Parser/test/code/formatPreservation/ |
H A D | group_use.test | 6 $stmts[0] = new Stmt\Use_([new Node\UseItem(new Node\Name('A\B'))]);
|
/PHP-Parser/test/PhpParser/NodeVisitor/ |
H A D | NameResolverTest.php | 437 new Stmt\Use_([ 440 ], Stmt\Use_::TYPE_NORMAL), 444 new Stmt\Use_([ 447 ], Stmt\Use_::TYPE_FUNCTION), 451 new Stmt\Use_([ 454 ], Stmt\Use_::TYPE_CONSTANT),
|
/PHP-Parser/lib/PhpParser/NodeVisitor/ |
H A D | NameResolver.php | 58 } elseif ($node instanceof Stmt\Use_) { 145 $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION); 148 $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT); 253 return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL);
|
/PHP-Parser/grammar/ |
H A D | php.y | 257 …| T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMA… 258 | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } 264 T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } 265 | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } 272 { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } 306 { $$ = Node\UseItem[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } 308 { $$ = Node\UseItem[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } 313 { $$ = Node\UseItem[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } 315 { $$ = Node\UseItem[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } 319 …unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL…
|
/PHP-Parser/tools/fuzzing/ |
H A D | target.php | 88 if ($node instanceof Stmt\Use_ && $node->uses[0]->name->isUnqualified() &&
|
/PHP-Parser/doc/component/ |
H A D | Name_resolution.markdown | 78 The `$type` parameters accept one of the `Stmt\Use_::TYPE_*` constants, which represent the three
|
/PHP-Parser/lib/PhpParser/Parser/ |
H A D | Php7.php | 1368 …$self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->g… 1371 …$self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)]… 1378 $self->semValue = Stmt\Use_::TYPE_FUNCTION; 1381 $self->semValue = Stmt\Use_::TYPE_CONSTANT; 1387 …($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1411 …>semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $sel… 1414 …($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1417 …>semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $sel… 1420 …($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1423 …$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL;
|
H A D | Php8.php | 1363 …$self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->g… 1366 …$self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)]… 1373 $self->semValue = Stmt\Use_::TYPE_FUNCTION; 1376 $self->semValue = Stmt\Use_::TYPE_CONSTANT; 1382 …($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1406 …>semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $sel… 1409 …($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1412 …>semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $sel… 1415 …($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $sel… 1418 …$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL;
|
/PHP-Parser/lib/PhpParser/PrettyPrinter/ |
H A D | Standard.php | 759 protected function pStmt_Use(Stmt\Use_ $node): string { 775 return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' 776 : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
|
/PHP-Parser/doc/ |
H A D | 2_Usage_of_basic_components.markdown | 523 } elseif ($node instanceof Stmt\Use_) {
|
/PHP-Parser/ |
H A D | CHANGELOG.md | 20 `Stmt\Use_` nodes.
|