/PHP-Parser/test/PhpParser/Builder/ |
H A D | ParamTest.php | 6 use PhpParser\Node; alias 7 use PhpParser\Node\Arg; 8 use PhpParser\Node\Attribute; 10 use PhpParser\Node\Expr; 12 use PhpParser\Node\Name; 13 use PhpParser\Node\Scalar; 126 [new Node\Name('Some\Class'), new Node\Name('Some\Class')], 135 new Node\NullableType(new Node\Identifier('int')), 136 new Node\NullableType(new Node\Identifier('int')) 139 new Node\NullableType(new Node\Name('Some\Class')), [all …]
|
/PHP-Parser/lib/PhpParser/ |
H A D | NodeVisitor.php | 55 * @param Node[] $nodes Array of nodes 57 * @return null|Node[] Array of nodes 83 * @param Node $node Node 85 * @return null|int|Node|Node[] Replacement node (or special return value) 87 public function enterNode(Node $node); 106 * @param Node $node Node 108 * @return null|int|Node|Node[] Replacement node (or special return value) 110 public function leaveNode(Node $node); 119 * @param Node[] $nodes Array of nodes 121 * @return null|Node[] Array of nodes
|
H A D | NodeFinder.php | 12 * @param Node|Node[] $nodes Single node or array of nodes to search in 15 * @return Node[] Found nodes satisfying the filter callback 39 * @param Node|Node[] $nodes Single node or array of nodes to search in 53 * @param Node|Node[] $nodes Single node or array of nodes to search in 56 * @return null|Node Found node (or null if none found) 58 public function findFirst($nodes, callable $filter): ?Node { 80 * @param Node|Node[] $nodes Single node or array of nodes to search in 85 public function findFirstInstanceOf($nodes, string $class): ?Node {
|
/PHP-Parser/lib/PhpParser/Node/Stmt/ |
H A D | Foreach_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class Foreach_ extends Node\Stmt { 8 /** @var Node\Expr Expression to iterate */ 9 public Node\Expr $expr; 11 public ?Node\Expr $keyVar; 14 /** @var Node\Expr Variable to assign value to */ 15 public Node\Expr $valueVar; 16 /** @var Node\Stmt[] Statements */ 22 * @param Node\Expr $expr Expression to iterate [all …]
|
H A D | EnumCase.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 6 use PhpParser\Node\AttributeGroup; 8 class EnumCase extends Node\Stmt { 9 /** @var Node\Identifier Enum case name */ 10 public Node\Identifier $name; 11 /** @var Node\Expr|null Enum case expression */ 12 public ?Node\Expr $expr; 13 /** @var Node\AttributeGroup[] PHP attribute groups */ 17 * @param string|Node\Identifier $name Enum case name [all …]
|
H A D | Function_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 6 use PhpParser\Node\FunctionLike; 11 /** @var Node\Identifier Name */ 12 public Node\Identifier $name; 13 /** @var Node\Param[] Parameters */ 16 public ?Node $returnType; 17 /** @var Node\Stmt[] Statements */ 23 public ?Node\Name $namespacedName; 28 * @param string|Node\Identifier $name Name [all …]
|
H A D | Do_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class Do_ extends Node\Stmt { 8 /** @var Node\Stmt[] Statements */ 10 /** @var Node\Expr Condition */ 11 public Node\Expr $cond; 16 * @param Node\Expr $cond Condition 17 * @param Node\Stmt[] $stmts Statements 20 public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
H A D | ElseIf_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class ElseIf_ extends Node\Stmt { 8 /** @var Node\Expr Condition */ 9 public Node\Expr $cond; 10 /** @var Node\Stmt[] Statements */ 16 * @param Node\Expr $cond Condition 17 * @param Node\Stmt[] $stmts Statements 20 public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
H A D | Case_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class Case_ extends Node\Stmt { 8 /** @var null|Node\Expr Condition (null for default) */ 9 public ?Node\Expr $cond; 10 /** @var Node\Stmt[] Statements */ 16 * @param null|Node\Expr $cond Condition (null for default) 17 * @param Node\Stmt[] $stmts Statements 20 public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
H A D | While_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class While_ extends Node\Stmt { 8 /** @var Node\Expr Condition */ 9 public Node\Expr $cond; 10 /** @var Node\Stmt[] Statements */ 16 * @param Node\Expr $cond Condition 17 * @param Node\Stmt[] $stmts Statements 20 public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
H A D | Namespace_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class Namespace_ extends Node\Stmt { 12 /** @var null|Node\Name Name */ 13 public ?Node\Name $name; 14 /** @var Node\Stmt[] Statements */ 20 * @param null|Node\Name $name Name 21 * @param null|Node\Stmt[] $stmts Statements 24 … public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) {
|
H A D | TraitUseAdaptation.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 abstract class TraitUseAdaptation extends Node\Stmt { 8 /** @var Node\Name|null Trait name */ 9 public ?Node\Name $trait; 10 /** @var Node\Identifier Method name */ 11 public Node\Identifier $method;
|
H A D | Expression.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 10 class Expression extends Node\Stmt { 11 /** @var Node\Expr Expression */ 12 public Node\Expr $expr; 17 * @param Node\Expr $expr Expression 20 public function __construct(Node\Expr $expr, array $attributes = []) {
|
H A D | Break_.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 7 class Break_ extends Node\Stmt { 8 /** @var null|Node\Expr Number of loops to break */ 9 public ?Node\Expr $num; 14 * @param null|Node\Expr $num Number of loops to break 17 public function __construct(?Node\Expr $num = null, array $attributes = []) {
|
/PHP-Parser/lib/PhpParser/Internal/ |
H A D | PrintableNewAnonClassNode.php | 5 use PhpParser\Node; alias 6 use PhpParser\Node\Expr; 19 /** @var Node\AttributeGroup[] PHP attribute groups */ 23 /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ 25 /** @var null|Node\Name Name of extended class */ 26 public ?Node\Name $extends; 27 /** @var Node\Name[] Names of implemented interfaces */ 29 /** @var Node\Stmt[] Statements */ 35 * @param Node\Name|null $extends Name of extended class 37 * @param Node\Stmt[] $stmts Statements [all …]
|
/PHP-Parser/test/PhpParser/Node/Stmt/ |
H A D | InterfaceTest.php | 3 namespace PhpParser\Node\Stmt; 5 use PhpParser\Node; alias 6 use PhpParser\Node\Scalar\String_; 16 new Node\Stmt\ClassConst([new Node\Const_('C1', new Node\Scalar\String_('C1'))]), 18 new Node\Stmt\ClassConst([new Node\Const_('C2', new Node\Scalar\String_('C2'))]), 20 new Node\Stmt\ClassConst([new Node\Const_('C3', new Node\Scalar\String_('C3'))]), 29 new ClassConst([new \PhpParser\Node\Const_('foo', new String_('foo_value'))]), 30 new ClassConst([new \PhpParser\Node\Const_('bar', new String_('bar_value'))]),
|
/PHP-Parser/lib/PhpParser/Node/Expr/ |
H A D | StaticCall.php | 3 namespace PhpParser\Node\Expr; 5 use PhpParser\Node; alias 6 use PhpParser\Node\Arg; 7 use PhpParser\Node\Expr; 8 use PhpParser\Node\Identifier; 9 use PhpParser\Node\VariadicPlaceholder; 12 /** @var Node\Name|Expr Class name */ 13 public Node $class; 15 public Node $name; 22 * @param Node\Name|Expr $class Class name [all …]
|
H A D | New_.php | 3 namespace PhpParser\Node\Expr; 5 use PhpParser\Node; alias 6 use PhpParser\Node\Arg; 7 use PhpParser\Node\Expr; 8 use PhpParser\Node\VariadicPlaceholder; 11 /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ 12 public Node $class; 19 … * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) 23 public function __construct(Node $class, array $args = [], array $attributes = []) {
|
H A D | Match_.php | 3 namespace PhpParser\Node\Expr; 5 use PhpParser\Node; alias 6 use PhpParser\Node\MatchArm; 8 class Match_ extends Node\Expr { 9 /** @var Node\Expr Condition */ 10 public Node\Expr $cond; 15 * @param Node\Expr $cond Condition 19 public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) {
|
H A D | Throw_.php | 3 namespace PhpParser\Node\Expr; 5 use PhpParser\Node; alias 7 class Throw_ extends Node\Expr { 8 /** @var Node\Expr Expression */ 9 public Node\Expr $expr; 14 * @param Node\Expr $expr Expression 17 public function __construct(Node\Expr $expr, array $attributes = []) {
|
/PHP-Parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/ |
H A D | Alias.php | 3 namespace PhpParser\Node\Stmt\TraitUseAdaptation; 5 use PhpParser\Node; alias 7 class Alias extends Node\Stmt\TraitUseAdaptation { 10 /** @var null|Node\Identifier New name */ 11 public ?Node\Identifier $newName; 16 * @param null|Node\Name $trait Trait name 17 * @param string|Node\Identifier $method Method name 19 * @param null|string|Node\Identifier $newName New name 22 …public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attrib… 25 $this->method = \is_string($method) ? new Node\Identifier($method) : $method; [all …]
|
H A D | Precedence.php | 3 namespace PhpParser\Node\Stmt\TraitUseAdaptation; 5 use PhpParser\Node; alias 7 class Precedence extends Node\Stmt\TraitUseAdaptation { 8 /** @var Node\Name[] Overwritten traits */ 14 * @param Node\Name $trait Trait name 15 * @param string|Node\Identifier $method Method name 16 * @param Node\Name[] $insteadof Overwritten traits 19 … public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { 22 $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
|
/PHP-Parser/test/code/formatPreservation/ |
H A D | emptyListInsertion.test | 10 $stmts[0]->implements[] = new Node\Name('Iface'); 12 $stmts[1]->extends[] = new Node\Name('Iface'); 13 $stmts[1]->extends[] = new Node\Name('Iface2'); 38 $stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('a')); 39 $stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('b')); 40 $stmts[1]->stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('a')); 41 $stmts[1]->stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('b')); 42 $stmts[2]->expr->params[] = new Node\Param(new Node\Expr\Variable('a')); 43 $stmts[2]->expr->params[] = new Node\Param(new Node\Expr\Variable('b')); 46 $stmts[3]->expr->params[] = new Node\Param(new Node\Expr\Variable('a')); [all …]
|
/PHP-Parser/test/PhpParser/ |
H A D | CompatibilityTest.php | 5 use PhpParser\Node\Expr; 6 use PhpParser\Node\InterpolatedStringPart; 7 use PhpParser\Node\Name; 8 use PhpParser\Node\Scalar; 9 use PhpParser\Node\Stmt; 18 $node = new Node\ClosureUse($var); 20 $node = new Node\ArrayItem($var); 22 $node = new Node\StaticVar($var); 34 $node = new Node\PropertyItem('x'); 52 $node = new Node\Scalar\DNumber(1.0); [all …]
|
H A D | BuilderHelpersTest.php | 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')); 36 BuilderHelpers::normalizeStmt(new Node\Attribute(new Node\Name('Test'))); 69 $name = new Node\Name('test'); 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')]); [all …]
|