Перенес код
This commit is contained in:
44
vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
vendored
Normal file
44
vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Arg extends NodeAbstract {
|
||||
/** @var Identifier|null Parameter name (for named parameters) */
|
||||
public ?Identifier $name;
|
||||
/** @var Expr Value to pass */
|
||||
public Expr $value;
|
||||
/** @var bool Whether to pass by ref */
|
||||
public bool $byRef;
|
||||
/** @var bool Whether to unpack the argument */
|
||||
public bool $unpack;
|
||||
|
||||
/**
|
||||
* Constructs a function call argument node.
|
||||
*
|
||||
* @param Expr $value Value to pass
|
||||
* @param bool $byRef Whether to pass by ref
|
||||
* @param bool $unpack Whether to unpack the argument
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
* @param Identifier|null $name Parameter name (for named parameters)
|
||||
*/
|
||||
public function __construct(
|
||||
Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [],
|
||||
?Identifier $name = null
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
$this->byRef = $byRef;
|
||||
$this->unpack = $unpack;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'value', 'byRef', 'unpack'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Arg';
|
||||
}
|
||||
}
|
43
vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php
vendored
Normal file
43
vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class ArrayItem extends NodeAbstract {
|
||||
/** @var null|Expr Key */
|
||||
public ?Expr $key;
|
||||
/** @var Expr Value */
|
||||
public Expr $value;
|
||||
/** @var bool Whether to assign by reference */
|
||||
public bool $byRef;
|
||||
/** @var bool Whether to unpack the argument */
|
||||
public bool $unpack;
|
||||
|
||||
/**
|
||||
* Constructs an array item node.
|
||||
*
|
||||
* @param Expr $value Value
|
||||
* @param null|Expr $key Key
|
||||
* @param bool $byRef Whether to assign by reference
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) {
|
||||
$this->attributes = $attributes;
|
||||
$this->key = $key;
|
||||
$this->value = $value;
|
||||
$this->byRef = $byRef;
|
||||
$this->unpack = $unpack;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['key', 'value', 'byRef', 'unpack'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'ArrayItem';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(ArrayItem::class, Expr\ArrayItem::class);
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Attribute extends NodeAbstract {
|
||||
/** @var Name Attribute name */
|
||||
public Name $name;
|
||||
|
||||
/** @var list<Arg> Attribute arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* @param Node\Name $name Attribute name
|
||||
* @param list<Arg> $args Attribute arguments
|
||||
* @param array<string, mixed> $attributes Additional node attributes
|
||||
*/
|
||||
public function __construct(Name $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Attribute';
|
||||
}
|
||||
}
|
27
vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class AttributeGroup extends NodeAbstract {
|
||||
/** @var Attribute[] Attributes */
|
||||
public array $attrs;
|
||||
|
||||
/**
|
||||
* @param Attribute[] $attrs PHP attributes
|
||||
* @param array<string, mixed> $attributes Additional node attributes
|
||||
*/
|
||||
public function __construct(array $attrs, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->attrs = $attrs;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrs'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'AttributeGroup';
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class ClosureUse extends NodeAbstract {
|
||||
/** @var Expr\Variable Variable to use */
|
||||
public Expr\Variable $var;
|
||||
/** @var bool Whether to use by reference */
|
||||
public bool $byRef;
|
||||
|
||||
/**
|
||||
* Constructs a closure use node.
|
||||
*
|
||||
* @param Expr\Variable $var Variable to use
|
||||
* @param bool $byRef Whether to use by reference
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->byRef = $byRef;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'byRef'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'ClosureUse';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(ClosureUse::class, Expr\ClosureUse::class);
|
13
vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php
vendored
Normal file
13
vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
/**
|
||||
* This is a base class for complex types, including nullable types and union types.
|
||||
*
|
||||
* It does not provide any shared behavior and exists only for type-checking purposes.
|
||||
*/
|
||||
abstract class ComplexType extends NodeAbstract {
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Const_ extends NodeAbstract {
|
||||
/** @var Identifier Name */
|
||||
public Identifier $name;
|
||||
/** @var Expr Value */
|
||||
public Expr $value;
|
||||
|
||||
/** @var Name|null Namespaced name (if using NameResolver) */
|
||||
public ?Name $namespacedName;
|
||||
|
||||
/**
|
||||
* Constructs a const node for use in class const and const statements.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param Expr $value Value
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, Expr $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'value'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Const';
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class DeclareItem extends NodeAbstract {
|
||||
/** @var Node\Identifier Key */
|
||||
public Identifier $key;
|
||||
/** @var Node\Expr Value */
|
||||
public Expr $value;
|
||||
|
||||
/**
|
||||
* Constructs a declare key=>value pair node.
|
||||
*
|
||||
* @param string|Node\Identifier $key Key
|
||||
* @param Node\Expr $value Value
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($key, Node\Expr $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->key = \is_string($key) ? new Node\Identifier($key) : $key;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['key', 'value'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'DeclareItem';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(DeclareItem::class, Stmt\DeclareDeclare::class);
|
8
vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
vendored
Normal file
8
vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
abstract class Expr extends NodeAbstract {
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class ArrayDimFetch extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
/** @var null|Expr Array index / dim */
|
||||
public ?Expr $dim;
|
||||
|
||||
/**
|
||||
* Constructs an array index fetch node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param null|Expr $dim Array index / dim
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->dim = $dim;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'dim'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ArrayDimFetch';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../ArrayItem.php';
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\ArrayItem;
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Array_ extends Expr {
|
||||
// For use in "kind" attribute
|
||||
public const KIND_LONG = 1; // array() syntax
|
||||
public const KIND_SHORT = 2; // [] syntax
|
||||
|
||||
/** @var ArrayItem[] Items */
|
||||
public array $items;
|
||||
|
||||
/**
|
||||
* Constructs an array node.
|
||||
*
|
||||
* @param ArrayItem[] $items Items of the array
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $items = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->items = $items;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['items'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Array';
|
||||
}
|
||||
}
|
84
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
vendored
Normal file
84
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
|
||||
class ArrowFunction extends Expr implements FunctionLike {
|
||||
/** @var bool Whether the closure is static */
|
||||
public bool $static;
|
||||
|
||||
/** @var bool Whether to return by reference */
|
||||
public bool $byRef;
|
||||
|
||||
/** @var Node\Param[] */
|
||||
public array $params = [];
|
||||
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType */
|
||||
public ?Node $returnType;
|
||||
|
||||
/** @var Expr Expression body */
|
||||
public Expr $expr;
|
||||
/** @var Node\AttributeGroup[] */
|
||||
public array $attrGroups;
|
||||
|
||||
/**
|
||||
* @param array{
|
||||
* expr: Expr,
|
||||
* static?: bool,
|
||||
* byRef?: bool,
|
||||
* params?: Node\Param[],
|
||||
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
|
||||
* attrGroups?: Node\AttributeGroup[]
|
||||
* } $subNodes Array of the following subnodes:
|
||||
* 'expr' : Expression body
|
||||
* 'static' => false : Whether the closure is static
|
||||
* 'byRef' => false : Whether to return by reference
|
||||
* 'params' => array() : Parameters
|
||||
* 'returnType' => null : Return type
|
||||
* 'attrGroups' => array() : PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $subNodes, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->static = $subNodes['static'] ?? false;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->params = $subNodes['params'] ?? [];
|
||||
$this->returnType = $subNodes['returnType'] ?? null;
|
||||
$this->expr = $subNodes['expr'];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
|
||||
}
|
||||
|
||||
public function returnsByRef(): bool {
|
||||
return $this->byRef;
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function getReturnType() {
|
||||
return $this->returnType;
|
||||
}
|
||||
|
||||
public function getAttrGroups(): array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Node\Stmt\Return_[]
|
||||
*/
|
||||
public function getStmts(): array {
|
||||
return [new Node\Stmt\Return_($this->expr)];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ArrowFunction';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Assign extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an assignment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Assign';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
abstract class AssignOp extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a compound assignment operation node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseAnd extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_BitwiseAnd';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseOr extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_BitwiseOr';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseXor extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_BitwiseXor';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Coalesce extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Coalesce';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Concat extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Concat';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Div extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Div';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Minus extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Minus';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Mod extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Mod';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Mul extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Mul';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Plus extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Plus';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Pow extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_Pow';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class ShiftLeft extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_ShiftLeft';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class ShiftRight extends AssignOp {
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignOp_ShiftRight';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class AssignRef extends Expr {
|
||||
/** @var Expr Variable reference is assigned to */
|
||||
public Expr $var;
|
||||
/** @var Expr Variable which is referenced */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an assignment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_AssignRef';
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
abstract class BinaryOp extends Expr {
|
||||
/** @var Expr The left hand side expression */
|
||||
public Expr $left;
|
||||
/** @var Expr The right hand side expression */
|
||||
public Expr $right;
|
||||
|
||||
/**
|
||||
* Constructs a binary operator node.
|
||||
*
|
||||
* @param Expr $left The left hand side expression
|
||||
* @param Expr $right The right hand side expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $left, Expr $right, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->left = $left;
|
||||
$this->right = $right;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['left', 'right'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the operator sigil for this binary operation.
|
||||
*
|
||||
* In the case there are multiple possible sigils for an operator, this method does not
|
||||
* necessarily return the one used in the parsed code.
|
||||
*/
|
||||
abstract public function getOperatorSigil(): string;
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseAnd extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '&';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_BitwiseAnd';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseOr extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '|';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_BitwiseOr';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseXor extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '^';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_BitwiseXor';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BooleanAnd extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '&&';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_BooleanAnd';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BooleanOr extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '||';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_BooleanOr';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Coalesce extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '??';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Coalesce';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Concat extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '.';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Concat';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Div extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '/';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Div';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Equal extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '==';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Equal';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Greater extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '>';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Greater';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class GreaterOrEqual extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '>=';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_GreaterOrEqual';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Identical extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '===';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Identical';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class LogicalAnd extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return 'and';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_LogicalAnd';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class LogicalOr extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return 'or';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_LogicalOr';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class LogicalXor extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return 'xor';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_LogicalXor';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Minus extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '-';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Minus';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Mod extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '%';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Mod';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Mul extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '*';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Mul';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class NotEqual extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '!=';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_NotEqual';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class NotIdentical extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '!==';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_NotIdentical';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Plus extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '+';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Plus';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Pow extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '**';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Pow';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class ShiftLeft extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '<<';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_ShiftLeft';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class ShiftRight extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '>>';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_ShiftRight';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Smaller extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '<';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Smaller';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class SmallerOrEqual extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '<=';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_SmallerOrEqual';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Spaceship extends BinaryOp {
|
||||
public function getOperatorSigil(): string {
|
||||
return '<=>';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BinaryOp_Spaceship';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class BitwiseNot extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a bitwise not node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BitwiseNot';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class BooleanNot extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a boolean not node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_BooleanNot';
|
||||
}
|
||||
}
|
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php
vendored
Normal file
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
|
||||
abstract class CallLike extends Expr {
|
||||
/**
|
||||
* Return raw arguments, which may be actual Args, or VariadicPlaceholders for first-class
|
||||
* callables.
|
||||
*
|
||||
* @return array<Arg|VariadicPlaceholder>
|
||||
*/
|
||||
abstract public function getRawArgs(): array;
|
||||
|
||||
/**
|
||||
* Returns whether this call expression is actually a first class callable.
|
||||
*/
|
||||
public function isFirstClassCallable(): bool {
|
||||
$rawArgs = $this->getRawArgs();
|
||||
return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that this is not a first-class callable and return only ordinary Args.
|
||||
*
|
||||
* @return Arg[]
|
||||
*/
|
||||
public function getArgs(): array {
|
||||
assert(!$this->isFirstClassCallable());
|
||||
return $this->getRawArgs();
|
||||
}
|
||||
}
|
25
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php
vendored
Normal file
25
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
abstract class Cast extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a cast node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Array_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Array';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Bool_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Bool';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Double extends Cast {
|
||||
// For use in "kind" attribute
|
||||
public const KIND_DOUBLE = 1; // "double" syntax
|
||||
public const KIND_FLOAT = 2; // "float" syntax
|
||||
public const KIND_REAL = 3; // "real" syntax
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Double';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Int_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Int';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Object_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Object';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class String_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_String';
|
||||
}
|
||||
}
|
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php
vendored
Normal file
11
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\Cast;
|
||||
|
||||
use PhpParser\Node\Expr\Cast;
|
||||
|
||||
class Unset_ extends Cast {
|
||||
public function getType(): string {
|
||||
return 'Expr_Cast_Unset';
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
|
||||
class ClassConstFetch extends Expr {
|
||||
/** @var Name|Expr Class name */
|
||||
public Node $class;
|
||||
/** @var Identifier|Expr|Error Constant name */
|
||||
public Node $name;
|
||||
|
||||
/**
|
||||
* Constructs a class const fetch node.
|
||||
*
|
||||
* @param Name|Expr $class Class name
|
||||
* @param string|Identifier|Expr|Error $name Constant name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $class, $name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->class = $class;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['class', 'name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ClassConstFetch';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Clone_ extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a clone node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Clone';
|
||||
}
|
||||
}
|
86
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php
vendored
Normal file
86
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\ClosureUse;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
|
||||
class Closure extends Expr implements FunctionLike {
|
||||
/** @var bool Whether the closure is static */
|
||||
public bool $static;
|
||||
/** @var bool Whether to return by reference */
|
||||
public bool $byRef;
|
||||
/** @var Node\Param[] Parameters */
|
||||
public array $params;
|
||||
/** @var ClosureUse[] use()s */
|
||||
public array $uses;
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
|
||||
public ?Node $returnType;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/**
|
||||
* Constructs a lambda function node.
|
||||
*
|
||||
* @param array{
|
||||
* static?: bool,
|
||||
* byRef?: bool,
|
||||
* params?: Node\Param[],
|
||||
* uses?: ClosureUse[],
|
||||
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'static' => false : Whether the closure is static
|
||||
* 'byRef' => false : Whether to return by reference
|
||||
* 'params' => array(): Parameters
|
||||
* 'uses' => array(): use()s
|
||||
* 'returnType' => null : Return type
|
||||
* 'stmts' => array(): Statements
|
||||
* 'attrGroups' => array(): PHP attributes groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->static = $subNodes['static'] ?? false;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->params = $subNodes['params'] ?? [];
|
||||
$this->uses = $subNodes['uses'] ?? [];
|
||||
$this->returnType = $subNodes['returnType'] ?? null;
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts'];
|
||||
}
|
||||
|
||||
public function returnsByRef(): bool {
|
||||
return $this->byRef;
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function getReturnType() {
|
||||
return $this->returnType;
|
||||
}
|
||||
|
||||
/** @return Node\Stmt[] */
|
||||
public function getStmts(): array {
|
||||
return $this->stmts;
|
||||
}
|
||||
|
||||
public function getAttrGroups(): array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Closure';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../ClosureUse.php';
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Name;
|
||||
|
||||
class ConstFetch extends Expr {
|
||||
/** @var Name Constant name */
|
||||
public Name $name;
|
||||
|
||||
/**
|
||||
* Constructs a const fetch node.
|
||||
*
|
||||
* @param Name $name Constant name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Name $name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ConstFetch';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Empty_ extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an empty() node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Empty';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
/**
|
||||
* Error node used during parsing with error recovery.
|
||||
*
|
||||
* An error node may be placed at a position where an expression is required, but an error occurred.
|
||||
* Error nodes will not be present if the parser is run in throwOnError mode (the default).
|
||||
*/
|
||||
class Error extends Expr {
|
||||
/**
|
||||
* Constructs an error node.
|
||||
*
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Error';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class ErrorSuppress extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an error suppress node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ErrorSuppress';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Eval_ extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an eval() node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Eval';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Exit_ extends Expr {
|
||||
/* For use in "kind" attribute */
|
||||
public const KIND_EXIT = 1;
|
||||
public const KIND_DIE = 2;
|
||||
|
||||
/** @var null|Expr Expression */
|
||||
public ?Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an exit() node.
|
||||
*
|
||||
* @param null|Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Expr $expr = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Exit';
|
||||
}
|
||||
}
|
38
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php
vendored
Normal file
38
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class FuncCall extends CallLike {
|
||||
/** @var Node\Name|Expr Function name */
|
||||
public Node $name;
|
||||
/** @var array<Node\Arg|Node\VariadicPlaceholder> Arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* Constructs a function call node.
|
||||
*
|
||||
* @param Node\Name|Expr $name Function name
|
||||
* @param array<Node\Arg|Node\VariadicPlaceholder> $args Arguments
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_FuncCall';
|
||||
}
|
||||
|
||||
public function getRawArgs(): array {
|
||||
return $this->args;
|
||||
}
|
||||
}
|
38
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
vendored
Normal file
38
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Include_ extends Expr {
|
||||
public const TYPE_INCLUDE = 1;
|
||||
public const TYPE_INCLUDE_ONCE = 2;
|
||||
public const TYPE_REQUIRE = 3;
|
||||
public const TYPE_REQUIRE_ONCE = 4;
|
||||
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
/** @var int Type of include */
|
||||
public int $type;
|
||||
|
||||
/**
|
||||
* Constructs an include node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param int $type Type of include
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, int $type, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr', 'type'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Include';
|
||||
}
|
||||
}
|
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php
vendored
Normal file
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Name;
|
||||
|
||||
class Instanceof_ extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
/** @var Name|Expr Class name */
|
||||
public Node $class;
|
||||
|
||||
/**
|
||||
* Constructs an instanceof check node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param Name|Expr $class Class name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, Node $class, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
$this->class = $class;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr', 'class'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Instanceof';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Isset_ extends Expr {
|
||||
/** @var Expr[] Variables */
|
||||
public array $vars;
|
||||
|
||||
/**
|
||||
* Constructs an array node.
|
||||
*
|
||||
* @param Expr[] $vars Variables
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $vars, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->vars = $vars;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['vars'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Isset';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\ArrayItem;
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class List_ extends Expr {
|
||||
// For use in "kind" attribute
|
||||
public const KIND_LIST = 1; // list() syntax
|
||||
public const KIND_ARRAY = 2; // [] syntax
|
||||
|
||||
/** @var (ArrayItem|null)[] List of items to assign to */
|
||||
public array $items;
|
||||
|
||||
/**
|
||||
* Constructs a list() destructuring node.
|
||||
*
|
||||
* @param (ArrayItem|null)[] $items List of items to assign to
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $items, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->items = $items;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['items'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_List';
|
||||
}
|
||||
}
|
32
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php
vendored
Normal file
32
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\MatchArm;
|
||||
|
||||
class Match_ extends Node\Expr {
|
||||
/** @var Node\Expr Condition */
|
||||
public Node\Expr $cond;
|
||||
/** @var MatchArm[] */
|
||||
public array $arms;
|
||||
|
||||
/**
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param MatchArm[] $arms
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->arms = $arms;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'arms'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Match';
|
||||
}
|
||||
}
|
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php
vendored
Normal file
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
|
||||
class MethodCall extends CallLike {
|
||||
/** @var Expr Variable holding object */
|
||||
public Expr $var;
|
||||
/** @var Identifier|Expr Method name */
|
||||
public Node $name;
|
||||
/** @var array<Arg|VariadicPlaceholder> Arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* Constructs a function call node.
|
||||
*
|
||||
* @param Expr $var Variable holding object
|
||||
* @param string|Identifier|Expr $name Method name
|
||||
* @param array<Arg|VariadicPlaceholder> $args Arguments
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'name', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_MethodCall';
|
||||
}
|
||||
|
||||
public function getRawArgs(): array {
|
||||
return $this->args;
|
||||
}
|
||||
}
|
40
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
vendored
Normal file
40
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
|
||||
class New_ extends CallLike {
|
||||
/** @var Node\Name|Expr|Node\Stmt\Class_ Class name */
|
||||
public Node $class;
|
||||
/** @var array<Arg|VariadicPlaceholder> Arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* Constructs a function call node.
|
||||
*
|
||||
* @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes)
|
||||
* @param array<Arg|VariadicPlaceholder> $args Arguments
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $class, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->class = $class;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['class', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_New';
|
||||
}
|
||||
|
||||
public function getRawArgs(): array {
|
||||
return $this->args;
|
||||
}
|
||||
}
|
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php
vendored
Normal file
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
|
||||
class NullsafeMethodCall extends CallLike {
|
||||
/** @var Expr Variable holding object */
|
||||
public Expr $var;
|
||||
/** @var Identifier|Expr Method name */
|
||||
public Node $name;
|
||||
/** @var array<Arg|VariadicPlaceholder> Arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* Constructs a nullsafe method call node.
|
||||
*
|
||||
* @param Expr $var Variable holding object
|
||||
* @param string|Identifier|Expr $name Method name
|
||||
* @param array<Arg|VariadicPlaceholder> $args Arguments
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'name', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_NullsafeMethodCall';
|
||||
}
|
||||
|
||||
public function getRawArgs(): array {
|
||||
return $this->args;
|
||||
}
|
||||
}
|
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php
vendored
Normal file
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
|
||||
class NullsafePropertyFetch extends Expr {
|
||||
/** @var Expr Variable holding object */
|
||||
public Expr $var;
|
||||
/** @var Identifier|Expr Property name */
|
||||
public Node $name;
|
||||
|
||||
/**
|
||||
* Constructs a nullsafe property fetch node.
|
||||
*
|
||||
* @param Expr $var Variable holding object
|
||||
* @param string|Identifier|Expr $name Property name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, $name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_NullsafePropertyFetch';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class PostDec extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
|
||||
/**
|
||||
* Constructs a post decrement node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_PostDec';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class PostInc extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
|
||||
/**
|
||||
* Constructs a post increment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_PostInc';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class PreDec extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
|
||||
/**
|
||||
* Constructs a pre decrement node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_PreDec';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class PreInc extends Expr {
|
||||
/** @var Expr Variable */
|
||||
public Expr $var;
|
||||
|
||||
/**
|
||||
* Constructs a pre increment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_PreInc';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Print_ extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an print() node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Print';
|
||||
}
|
||||
}
|
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php
vendored
Normal file
35
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
|
||||
class PropertyFetch extends Expr {
|
||||
/** @var Expr Variable holding object */
|
||||
public Expr $var;
|
||||
/** @var Identifier|Expr Property name */
|
||||
public Node $name;
|
||||
|
||||
/**
|
||||
* Constructs a function call node.
|
||||
*
|
||||
* @param Expr $var Variable holding object
|
||||
* @param string|Identifier|Expr $name Property name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, $name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_PropertyFetch';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\InterpolatedStringPart;
|
||||
|
||||
class ShellExec extends Expr {
|
||||
/** @var (Expr|InterpolatedStringPart)[] Interpolated string array */
|
||||
public array $parts;
|
||||
|
||||
/**
|
||||
* Constructs a shell exec (backtick) node.
|
||||
*
|
||||
* @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $parts, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->parts = $parts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['parts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_ShellExec';
|
||||
}
|
||||
}
|
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php
vendored
Normal file
45
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
|
||||
class StaticCall extends CallLike {
|
||||
/** @var Node\Name|Expr Class name */
|
||||
public Node $class;
|
||||
/** @var Identifier|Expr Method name */
|
||||
public Node $name;
|
||||
/** @var array<Arg|VariadicPlaceholder> Arguments */
|
||||
public array $args;
|
||||
|
||||
/**
|
||||
* Constructs a static method call node.
|
||||
*
|
||||
* @param Node\Name|Expr $class Class name
|
||||
* @param string|Identifier|Expr $name Method name
|
||||
* @param array<Arg|VariadicPlaceholder> $args Arguments
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $class, $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->class = $class;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['class', 'name', 'args'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_StaticCall';
|
||||
}
|
||||
|
||||
public function getRawArgs(): array {
|
||||
return $this->args;
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\VarLikeIdentifier;
|
||||
|
||||
class StaticPropertyFetch extends Expr {
|
||||
/** @var Name|Expr Class name */
|
||||
public Node $class;
|
||||
/** @var VarLikeIdentifier|Expr Property name */
|
||||
public Node $name;
|
||||
|
||||
/**
|
||||
* Constructs a static property fetch node.
|
||||
*
|
||||
* @param Name|Expr $class Class name
|
||||
* @param string|VarLikeIdentifier|Expr $name Property name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $class, $name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->class = $class;
|
||||
$this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['class', 'name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_StaticPropertyFetch';
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Ternary extends Expr {
|
||||
/** @var Expr Condition */
|
||||
public Expr $cond;
|
||||
/** @var null|Expr Expression for true */
|
||||
public ?Expr $if;
|
||||
/** @var Expr Expression for false */
|
||||
public Expr $else;
|
||||
|
||||
/**
|
||||
* Constructs a ternary operator node.
|
||||
*
|
||||
* @param Expr $cond Condition
|
||||
* @param null|Expr $if Expression for true
|
||||
* @param Expr $else Expression for false
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->if = $if;
|
||||
$this->else = $else;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'if', 'else'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Ternary';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Throw_ extends Node\Expr {
|
||||
/** @var Node\Expr Expression */
|
||||
public Node\Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a throw expression node.
|
||||
*
|
||||
* @param Node\Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Throw';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class UnaryMinus extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a unary minus node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_UnaryMinus';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class UnaryPlus extends Expr {
|
||||
/** @var Expr Expression */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a unary plus node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_UnaryPlus';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Variable extends Expr {
|
||||
/** @var string|Expr Name */
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Constructs a variable node.
|
||||
*
|
||||
* @param string|Expr $name Name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Variable';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class YieldFrom extends Expr {
|
||||
/** @var Expr Expression to yield from */
|
||||
public Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an "yield from" node.
|
||||
*
|
||||
* @param Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_YieldFrom';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Yield_ extends Expr {
|
||||
/** @var null|Expr Key expression */
|
||||
public ?Expr $key;
|
||||
/** @var null|Expr Value expression */
|
||||
public ?Expr $value;
|
||||
|
||||
/**
|
||||
* Constructs a yield expression node.
|
||||
*
|
||||
* @param null|Expr $value Value expression
|
||||
* @param null|Expr $key Key expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->key = $key;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['key', 'value'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Expr_Yield';
|
||||
}
|
||||
}
|
40
vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php
vendored
Normal file
40
vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
interface FunctionLike extends Node {
|
||||
/**
|
||||
* Whether to return by reference
|
||||
*/
|
||||
public function returnsByRef(): bool;
|
||||
|
||||
/**
|
||||
* List of parameters
|
||||
*
|
||||
* @return Param[]
|
||||
*/
|
||||
public function getParams(): array;
|
||||
|
||||
/**
|
||||
* Get the declared return type or null
|
||||
*
|
||||
* @return null|Identifier|Name|ComplexType
|
||||
*/
|
||||
public function getReturnType();
|
||||
|
||||
/**
|
||||
* The function body
|
||||
*
|
||||
* @return Stmt[]|null
|
||||
*/
|
||||
public function getStmts(): ?array;
|
||||
|
||||
/**
|
||||
* Get PHP attribute groups.
|
||||
*
|
||||
* @return AttributeGroup[]
|
||||
*/
|
||||
public function getAttrGroups(): array;
|
||||
}
|
85
vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php
vendored
Normal file
85
vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
/**
|
||||
* Represents a non-namespaced name. Namespaced names are represented using Name nodes.
|
||||
*/
|
||||
class Identifier extends NodeAbstract {
|
||||
/**
|
||||
* @psalm-var non-empty-string
|
||||
* @var string Identifier as string
|
||||
*/
|
||||
public string $name;
|
||||
|
||||
/** @var array<string, bool> */
|
||||
private static array $specialClassNames = [
|
||||
'self' => true,
|
||||
'parent' => true,
|
||||
'static' => true,
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs an identifier node.
|
||||
*
|
||||
* @param string $name Identifier as string
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(string $name, array $attributes = []) {
|
||||
if ($name === '') {
|
||||
throw new \InvalidArgumentException('Identifier name cannot be empty');
|
||||
}
|
||||
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get identifier as string.
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string Identifier as string.
|
||||
*/
|
||||
public function toString(): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lowercased identifier as string.
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string Lowercased identifier as string
|
||||
*/
|
||||
public function toLowerString(): string {
|
||||
return strtolower($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the identifier is a special class name (self, parent or static).
|
||||
*
|
||||
* @return bool Whether identifier is a special class name
|
||||
*/
|
||||
public function isSpecialClassName(): bool {
|
||||
return isset(self::$specialClassNames[strtolower($this->name)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get identifier as string.
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string Identifier as string
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Identifier';
|
||||
}
|
||||
}
|
32
vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php
vendored
Normal file
32
vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class InterpolatedStringPart extends NodeAbstract {
|
||||
/** @var string String value */
|
||||
public string $value;
|
||||
|
||||
/**
|
||||
* Constructs a node representing a string part of an interpolated string.
|
||||
*
|
||||
* @param string $value String value
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(string $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['value'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'InterpolatedStringPart';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class);
|
27
vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
class IntersectionType extends ComplexType {
|
||||
/** @var (Identifier|Name)[] Types */
|
||||
public array $types;
|
||||
|
||||
/**
|
||||
* Constructs an intersection type.
|
||||
*
|
||||
* @param (Identifier|Name)[] $types Types
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $types, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->types = $types;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['types'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'IntersectionType';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class MatchArm extends NodeAbstract {
|
||||
/** @var null|list<Node\Expr> */
|
||||
public ?array $conds;
|
||||
/** @var Node\Expr */
|
||||
public Expr $body;
|
||||
|
||||
/**
|
||||
* @param null|list<Node\Expr> $conds
|
||||
*/
|
||||
public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
|
||||
$this->conds = $conds;
|
||||
$this->body = $body;
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['conds', 'body'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'MatchArm';
|
||||
}
|
||||
}
|
278
vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
vendored
Normal file
278
vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
vendored
Normal file
@ -0,0 +1,278 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Name extends NodeAbstract {
|
||||
/**
|
||||
* @psalm-var non-empty-string
|
||||
* @var string Name as string
|
||||
*/
|
||||
public string $name;
|
||||
|
||||
/** @var array<string, bool> */
|
||||
private static array $specialClassNames = [
|
||||
'self' => true,
|
||||
'parent' => true,
|
||||
'static' => true,
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs a name node.
|
||||
*
|
||||
* @param string|string[]|self $name Name as string, part array or Name instance (copy ctor)
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
final public function __construct($name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = self::prepareName($name);
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parts of name (split by the namespace separator).
|
||||
*
|
||||
* @psalm-return non-empty-list<string>
|
||||
* @return string[] Parts of name
|
||||
*/
|
||||
public function getParts(): array {
|
||||
return \explode('\\', $this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first part of the name, i.e. everything before the first namespace separator.
|
||||
*
|
||||
* @return string First part of the name
|
||||
*/
|
||||
public function getFirst(): string {
|
||||
if (false !== $pos = \strpos($this->name, '\\')) {
|
||||
return \substr($this->name, 0, $pos);
|
||||
}
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last part of the name, i.e. everything after the last namespace separator.
|
||||
*
|
||||
* @return string Last part of the name
|
||||
*/
|
||||
public function getLast(): string {
|
||||
if (false !== $pos = \strrpos($this->name, '\\')) {
|
||||
return \substr($this->name, $pos + 1);
|
||||
}
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is unqualified. (E.g. Name)
|
||||
*
|
||||
* @return bool Whether the name is unqualified
|
||||
*/
|
||||
public function isUnqualified(): bool {
|
||||
return false === \strpos($this->name, '\\');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is qualified. (E.g. Name\Name)
|
||||
*
|
||||
* @return bool Whether the name is qualified
|
||||
*/
|
||||
public function isQualified(): bool {
|
||||
return false !== \strpos($this->name, '\\');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is fully qualified. (E.g. \Name)
|
||||
*
|
||||
* @return bool Whether the name is fully qualified
|
||||
*/
|
||||
public function isFullyQualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
|
||||
*
|
||||
* @return bool Whether the name is relative
|
||||
*/
|
||||
public function isRelative(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the name itself, without taking the name type into
|
||||
* account (e.g., not including a leading backslash for fully qualified names).
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string String representation
|
||||
*/
|
||||
public function toString(): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the name as it would occur in code (e.g., including
|
||||
* leading backslash for fully qualified names.
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string String representation
|
||||
*/
|
||||
public function toCodeString(): string {
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns lowercased string representation of the name, without taking the name type into
|
||||
* account (e.g., no leading backslash for fully qualified names).
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string Lowercased string representation
|
||||
*/
|
||||
public function toLowerString(): string {
|
||||
return strtolower($this->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the identifier is a special class name (self, parent or static).
|
||||
*
|
||||
* @return bool Whether identifier is a special class name
|
||||
*/
|
||||
public function isSpecialClassName(): bool {
|
||||
return isset(self::$specialClassNames[strtolower($this->name)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the name by imploding the namespace parts with the
|
||||
* namespace separator.
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string String representation
|
||||
*/
|
||||
public function __toString(): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a slice of a name (similar to array_slice).
|
||||
*
|
||||
* This method returns a new instance of the same type as the original and with the same
|
||||
* attributes.
|
||||
*
|
||||
* If the slice is empty, null is returned. The null value will be correctly handled in
|
||||
* concatenations using concat().
|
||||
*
|
||||
* Offset and length have the same meaning as in array_slice().
|
||||
*
|
||||
* @param int $offset Offset to start the slice at (may be negative)
|
||||
* @param int|null $length Length of the slice (may be negative)
|
||||
*
|
||||
* @return static|null Sliced name
|
||||
*/
|
||||
public function slice(int $offset, ?int $length = null) {
|
||||
if ($offset === 1 && $length === null) {
|
||||
// Short-circuit the common case.
|
||||
if (false !== $pos = \strpos($this->name, '\\')) {
|
||||
return new static(\substr($this->name, $pos + 1));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
$parts = \explode('\\', $this->name);
|
||||
$numParts = \count($parts);
|
||||
|
||||
$realOffset = $offset < 0 ? $offset + $numParts : $offset;
|
||||
if ($realOffset < 0 || $realOffset > $numParts) {
|
||||
throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset));
|
||||
}
|
||||
|
||||
if (null === $length) {
|
||||
$realLength = $numParts - $realOffset;
|
||||
} else {
|
||||
$realLength = $length < 0 ? $length + $numParts - $realOffset : $length;
|
||||
if ($realLength < 0 || $realLength > $numParts - $realOffset) {
|
||||
throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length));
|
||||
}
|
||||
}
|
||||
|
||||
if ($realLength === 0) {
|
||||
// Empty slice is represented as null
|
||||
return null;
|
||||
}
|
||||
|
||||
return new static(array_slice($parts, $realOffset, $realLength), $this->attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenate two names, yielding a new Name instance.
|
||||
*
|
||||
* The type of the generated instance depends on which class this method is called on, for
|
||||
* example Name\FullyQualified::concat() will yield a Name\FullyQualified instance.
|
||||
*
|
||||
* If one of the arguments is null, a new instance of the other name will be returned. If both
|
||||
* arguments are null, null will be returned. As such, writing
|
||||
* Name::concat($namespace, $shortName)
|
||||
* where $namespace is a Name node or null will work as expected.
|
||||
*
|
||||
* @param string|string[]|self|null $name1 The first name
|
||||
* @param string|string[]|self|null $name2 The second name
|
||||
* @param array<string, mixed> $attributes Attributes to assign to concatenated name
|
||||
*
|
||||
* @return static|null Concatenated name
|
||||
*/
|
||||
public static function concat($name1, $name2, array $attributes = []) {
|
||||
if (null === $name1 && null === $name2) {
|
||||
return null;
|
||||
}
|
||||
if (null === $name1) {
|
||||
return new static($name2, $attributes);
|
||||
}
|
||||
if (null === $name2) {
|
||||
return new static($name1, $attributes);
|
||||
} else {
|
||||
return new static(
|
||||
self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a (string, array or Name node) name for use in name changing methods by converting
|
||||
* it to a string.
|
||||
*
|
||||
* @param string|string[]|self $name Name to prepare
|
||||
*
|
||||
* @psalm-return non-empty-string
|
||||
* @return string Prepared name
|
||||
*/
|
||||
private static function prepareName($name): string {
|
||||
if (\is_string($name)) {
|
||||
if ('' === $name) {
|
||||
throw new \InvalidArgumentException('Name cannot be empty');
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
if (\is_array($name)) {
|
||||
if (empty($name)) {
|
||||
throw new \InvalidArgumentException('Name cannot be empty');
|
||||
}
|
||||
|
||||
return implode('\\', $name);
|
||||
}
|
||||
if ($name instanceof self) {
|
||||
return $name->name;
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(
|
||||
'Expected string, array of parts or Name instance'
|
||||
);
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Name';
|
||||
}
|
||||
}
|
49
vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php
vendored
Normal file
49
vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Name;
|
||||
|
||||
class FullyQualified extends \PhpParser\Node\Name {
|
||||
/**
|
||||
* Checks whether the name is unqualified. (E.g. Name)
|
||||
*
|
||||
* @return bool Whether the name is unqualified
|
||||
*/
|
||||
public function isUnqualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is qualified. (E.g. Name\Name)
|
||||
*
|
||||
* @return bool Whether the name is qualified
|
||||
*/
|
||||
public function isQualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is fully qualified. (E.g. \Name)
|
||||
*
|
||||
* @return bool Whether the name is fully qualified
|
||||
*/
|
||||
public function isFullyQualified(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
|
||||
*
|
||||
* @return bool Whether the name is relative
|
||||
*/
|
||||
public function isRelative(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function toCodeString(): string {
|
||||
return '\\' . $this->toString();
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Name_FullyQualified';
|
||||
}
|
||||
}
|
49
vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php
vendored
Normal file
49
vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Name;
|
||||
|
||||
class Relative extends \PhpParser\Node\Name {
|
||||
/**
|
||||
* Checks whether the name is unqualified. (E.g. Name)
|
||||
*
|
||||
* @return bool Whether the name is unqualified
|
||||
*/
|
||||
public function isUnqualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is qualified. (E.g. Name\Name)
|
||||
*
|
||||
* @return bool Whether the name is qualified
|
||||
*/
|
||||
public function isQualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is fully qualified. (E.g. \Name)
|
||||
*
|
||||
* @return bool Whether the name is fully qualified
|
||||
*/
|
||||
public function isFullyQualified(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
|
||||
*
|
||||
* @return bool Whether the name is relative
|
||||
*/
|
||||
public function isRelative(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function toCodeString(): string {
|
||||
return 'namespace\\' . $this->toString();
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Name_Relative';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class NullableType extends ComplexType {
|
||||
/** @var Identifier|Name Type */
|
||||
public Node $type;
|
||||
|
||||
/**
|
||||
* Constructs a nullable type (wrapping another type).
|
||||
*
|
||||
* @param Identifier|Name $type Type
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node $type, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['type'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'NullableType';
|
||||
}
|
||||
}
|
84
vendor/nikic/php-parser/lib/PhpParser/Node/Param.php
vendored
Normal file
84
vendor/nikic/php-parser/lib/PhpParser/Node/Param.php
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Modifiers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Param extends NodeAbstract {
|
||||
/** @var null|Identifier|Name|ComplexType Type declaration */
|
||||
public ?Node $type;
|
||||
/** @var bool Whether parameter is passed by reference */
|
||||
public bool $byRef;
|
||||
/** @var bool Whether this is a variadic argument */
|
||||
public bool $variadic;
|
||||
/** @var Expr\Variable|Expr\Error Parameter variable */
|
||||
public Expr $var;
|
||||
/** @var null|Expr Default value */
|
||||
public ?Expr $default;
|
||||
/** @var int Optional visibility flags */
|
||||
public int $flags;
|
||||
/** @var AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/**
|
||||
* Constructs a parameter node.
|
||||
*
|
||||
* @param Expr\Variable|Expr\Error $var Parameter variable
|
||||
* @param null|Expr $default Default value
|
||||
* @param null|Identifier|Name|ComplexType $type Type declaration
|
||||
* @param bool $byRef Whether is passed by reference
|
||||
* @param bool $variadic Whether this is a variadic argument
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
* @param int $flags Optional visibility flags
|
||||
* @param list<AttributeGroup> $attrGroups PHP attribute groups
|
||||
*/
|
||||
public function __construct(
|
||||
Expr $var, ?Expr $default = null, ?Node $type = null,
|
||||
bool $byRef = false, bool $variadic = false,
|
||||
array $attributes = [],
|
||||
int $flags = 0,
|
||||
array $attrGroups = []
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->type = $type;
|
||||
$this->byRef = $byRef;
|
||||
$this->variadic = $variadic;
|
||||
$this->var = $var;
|
||||
$this->default = $default;
|
||||
$this->flags = $flags;
|
||||
$this->attrGroups = $attrGroups;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Param';
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this parameter uses constructor property promotion.
|
||||
*/
|
||||
public function isPromoted(): bool {
|
||||
return $this->flags !== 0;
|
||||
}
|
||||
|
||||
public function isPublic(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PUBLIC);
|
||||
}
|
||||
|
||||
public function isProtected(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PROTECTED);
|
||||
}
|
||||
|
||||
public function isPrivate(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PRIVATE);
|
||||
}
|
||||
|
||||
public function isReadonly(): bool {
|
||||
return (bool) ($this->flags & Modifiers::READONLY);
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class PropertyItem extends NodeAbstract {
|
||||
/** @var Node\VarLikeIdentifier Name */
|
||||
public VarLikeIdentifier $name;
|
||||
/** @var null|Node\Expr Default */
|
||||
public ?Expr $default;
|
||||
|
||||
/**
|
||||
* Constructs a class property item node.
|
||||
*
|
||||
* @param string|Node\VarLikeIdentifier $name Name
|
||||
* @param null|Node\Expr $default Default value
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, ?Node\Expr $default = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name;
|
||||
$this->default = $default;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'default'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'PropertyItem';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(PropertyItem::class, Stmt\PropertyProperty::class);
|
6
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
vendored
Normal file
6
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
abstract class Scalar extends Expr {
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/Float_.php';
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/InterpolatedString.php';
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../InterpolatedStringPart.php';
|
78
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php
vendored
Normal file
78
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar;
|
||||
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
class Float_ extends Scalar {
|
||||
/** @var float Number value */
|
||||
public float $value;
|
||||
|
||||
/**
|
||||
* Constructs a float number scalar node.
|
||||
*
|
||||
* @param float $value Value of the number
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(float $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $attributes
|
||||
*/
|
||||
public static function fromString(string $str, array $attributes = []): Float_ {
|
||||
$attributes['rawValue'] = $str;
|
||||
$float = self::parse($str);
|
||||
|
||||
return new Float_($float, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Parses a DNUMBER token like PHP would.
|
||||
*
|
||||
* @param string $str A string number
|
||||
*
|
||||
* @return float The parsed number
|
||||
*/
|
||||
public static function parse(string $str): float {
|
||||
$str = str_replace('_', '', $str);
|
||||
|
||||
// Check whether this is one of the special integer notations.
|
||||
if ('0' === $str[0]) {
|
||||
// hex
|
||||
if ('x' === $str[1] || 'X' === $str[1]) {
|
||||
return hexdec($str);
|
||||
}
|
||||
|
||||
// bin
|
||||
if ('b' === $str[1] || 'B' === $str[1]) {
|
||||
return bindec($str);
|
||||
}
|
||||
|
||||
// oct, but only if the string does not contain any of '.eE'.
|
||||
if (false === strpbrk($str, '.eE')) {
|
||||
// substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit
|
||||
// (8 or 9) so that only the digits before that are used.
|
||||
return octdec(substr($str, 0, strcspn($str, '89')));
|
||||
}
|
||||
}
|
||||
|
||||
// dec
|
||||
return (float) $str;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_Float';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(Float_::class, DNumber::class);
|
82
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php
vendored
Normal file
82
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
class Int_ extends Scalar {
|
||||
/* For use in "kind" attribute */
|
||||
public const KIND_BIN = 2;
|
||||
public const KIND_OCT = 8;
|
||||
public const KIND_DEC = 10;
|
||||
public const KIND_HEX = 16;
|
||||
|
||||
/** @var int Number value */
|
||||
public int $value;
|
||||
|
||||
/**
|
||||
* Constructs an integer number scalar node.
|
||||
*
|
||||
* @param int $value Value of the number
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(int $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Int node from a string number literal.
|
||||
*
|
||||
* @param string $str String number literal (decimal, octal, hex or binary)
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
* @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5)
|
||||
*
|
||||
* @return Int_ The constructed LNumber, including kind attribute
|
||||
*/
|
||||
public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ {
|
||||
$attributes['rawValue'] = $str;
|
||||
|
||||
$str = str_replace('_', '', $str);
|
||||
|
||||
if ('0' !== $str[0] || '0' === $str) {
|
||||
$attributes['kind'] = Int_::KIND_DEC;
|
||||
return new Int_((int) $str, $attributes);
|
||||
}
|
||||
|
||||
if ('x' === $str[1] || 'X' === $str[1]) {
|
||||
$attributes['kind'] = Int_::KIND_HEX;
|
||||
return new Int_(hexdec($str), $attributes);
|
||||
}
|
||||
|
||||
if ('b' === $str[1] || 'B' === $str[1]) {
|
||||
$attributes['kind'] = Int_::KIND_BIN;
|
||||
return new Int_(bindec($str), $attributes);
|
||||
}
|
||||
|
||||
if (!$allowInvalidOctal && strpbrk($str, '89')) {
|
||||
throw new Error('Invalid numeric literal', $attributes);
|
||||
}
|
||||
|
||||
// Strip optional explicit octal prefix.
|
||||
if ('o' === $str[1] || 'O' === $str[1]) {
|
||||
$str = substr($str, 2);
|
||||
}
|
||||
|
||||
// use intval instead of octdec to get proper cutting behavior with malformed numbers
|
||||
$attributes['kind'] = Int_::KIND_OCT;
|
||||
return new Int_(intval($str, 8), $attributes);
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_Int';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(Int_::class, LNumber::class);
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\InterpolatedStringPart;
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
class InterpolatedString extends Scalar {
|
||||
/** @var (Expr|InterpolatedStringPart)[] list of string parts */
|
||||
public array $parts;
|
||||
|
||||
/**
|
||||
* Constructs an interpolated string node.
|
||||
*
|
||||
* @param (Expr|InterpolatedStringPart)[] $parts Interpolated string parts
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $parts, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->parts = $parts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['parts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_InterpolatedString';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(InterpolatedString::class, Encapsed::class);
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/Int_.php';
|
27
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar;
|
||||
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
abstract class MagicConst extends Scalar {
|
||||
/**
|
||||
* Constructs a magic constant node.
|
||||
*
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name of magic constant.
|
||||
*
|
||||
* @return string Name of magic constant
|
||||
*/
|
||||
abstract public function getName(): string;
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Class_ extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__CLASS__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Class';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Dir extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__DIR__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Dir';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class File extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__FILE__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_File';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Function_ extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__FUNCTION__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Function';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Line extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__LINE__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Line';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Method extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__METHOD__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Method';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Namespace_ extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__NAMESPACE__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Namespace';
|
||||
}
|
||||
}
|
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
vendored
Normal file
15
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
use PhpParser\Node\Scalar\MagicConst;
|
||||
|
||||
class Trait_ extends MagicConst {
|
||||
public function getName(): string {
|
||||
return '__TRAIT__';
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_MagicConst_Trait';
|
||||
}
|
||||
}
|
161
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
vendored
Normal file
161
vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Scalar;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
class String_ extends Scalar {
|
||||
/* For use in "kind" attribute */
|
||||
public const KIND_SINGLE_QUOTED = 1;
|
||||
public const KIND_DOUBLE_QUOTED = 2;
|
||||
public const KIND_HEREDOC = 3;
|
||||
public const KIND_NOWDOC = 4;
|
||||
|
||||
/** @var string String value */
|
||||
public string $value;
|
||||
|
||||
/** @var array<string, string> Escaped character to its decoded value */
|
||||
protected static array $replacements = [
|
||||
'\\' => '\\',
|
||||
'$' => '$',
|
||||
'n' => "\n",
|
||||
'r' => "\r",
|
||||
't' => "\t",
|
||||
'f' => "\f",
|
||||
'v' => "\v",
|
||||
'e' => "\x1B",
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs a string scalar node.
|
||||
*
|
||||
* @param string $value Value of the string
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(string $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $attributes
|
||||
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
||||
*/
|
||||
public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self {
|
||||
$attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')))
|
||||
? Scalar\String_::KIND_SINGLE_QUOTED
|
||||
: Scalar\String_::KIND_DOUBLE_QUOTED;
|
||||
|
||||
$attributes['rawValue'] = $str;
|
||||
|
||||
$string = self::parse($str, $parseUnicodeEscape);
|
||||
|
||||
return new self($string, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Parses a string token.
|
||||
*
|
||||
* @param string $str String token content
|
||||
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
||||
*
|
||||
* @return string The parsed string
|
||||
*/
|
||||
public static function parse(string $str, bool $parseUnicodeEscape = true): string {
|
||||
$bLength = 0;
|
||||
if ('b' === $str[0] || 'B' === $str[0]) {
|
||||
$bLength = 1;
|
||||
}
|
||||
|
||||
if ('\'' === $str[$bLength]) {
|
||||
return str_replace(
|
||||
['\\\\', '\\\''],
|
||||
['\\', '\''],
|
||||
substr($str, $bLength + 1, -1)
|
||||
);
|
||||
} else {
|
||||
return self::parseEscapeSequences(
|
||||
substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Parses escape sequences in strings (all string types apart from single quoted).
|
||||
*
|
||||
* @param string $str String without quotes
|
||||
* @param null|string $quote Quote type
|
||||
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
||||
*
|
||||
* @return string String with escape sequences parsed
|
||||
*/
|
||||
public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string {
|
||||
if (null !== $quote) {
|
||||
$str = str_replace('\\' . $quote, $quote, $str);
|
||||
}
|
||||
|
||||
$extra = '';
|
||||
if ($parseUnicodeEscape) {
|
||||
$extra = '|u\{([0-9a-fA-F]+)\}';
|
||||
}
|
||||
|
||||
return preg_replace_callback(
|
||||
'~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
|
||||
function ($matches) {
|
||||
$str = $matches[1];
|
||||
|
||||
if (isset(self::$replacements[$str])) {
|
||||
return self::$replacements[$str];
|
||||
}
|
||||
if ('x' === $str[0] || 'X' === $str[0]) {
|
||||
return chr(hexdec(substr($str, 1)));
|
||||
}
|
||||
if ('u' === $str[0]) {
|
||||
$dec = hexdec($matches[2]);
|
||||
// If it overflowed to float, treat as INT_MAX, it will throw an error anyway.
|
||||
return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX);
|
||||
} else {
|
||||
return chr(octdec($str));
|
||||
}
|
||||
},
|
||||
$str
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Unicode code point to its UTF-8 encoded representation.
|
||||
*
|
||||
* @param int $num Code point
|
||||
*
|
||||
* @return string UTF-8 representation of code point
|
||||
*/
|
||||
private static function codePointToUtf8(int $num): string {
|
||||
if ($num <= 0x7F) {
|
||||
return chr($num);
|
||||
}
|
||||
if ($num <= 0x7FF) {
|
||||
return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80);
|
||||
}
|
||||
if ($num <= 0xFFFF) {
|
||||
return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
|
||||
}
|
||||
if ($num <= 0x1FFFFF) {
|
||||
return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80)
|
||||
. chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
|
||||
}
|
||||
throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Scalar_String';
|
||||
}
|
||||
}
|
39
vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php
vendored
Normal file
39
vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class StaticVar extends NodeAbstract {
|
||||
/** @var Expr\Variable Variable */
|
||||
public Expr\Variable $var;
|
||||
/** @var null|Node\Expr Default value */
|
||||
public ?Expr $default;
|
||||
|
||||
/**
|
||||
* Constructs a static variable node.
|
||||
*
|
||||
* @param Expr\Variable $var Name
|
||||
* @param null|Node\Expr $default Default value
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(
|
||||
Expr\Variable $var, ?Node\Expr $default = null, array $attributes = []
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->default = $default;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['var', 'default'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'StaticVar';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(StaticVar::class, Stmt\StaticVar::class);
|
8
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
vendored
Normal file
8
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
abstract class Stmt extends NodeAbstract {
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Block extends Stmt {
|
||||
/** @var Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* A block of statements.
|
||||
*
|
||||
* @param Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $stmts, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Block';
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['stmts'];
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Break_ extends Node\Stmt {
|
||||
/** @var null|Node\Expr Number of loops to break */
|
||||
public ?Node\Expr $num;
|
||||
|
||||
/**
|
||||
* Constructs a break node.
|
||||
*
|
||||
* @param null|Node\Expr $num Number of loops to break
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Expr $num = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->num = $num;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['num'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Break';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Case_ extends Node\Stmt {
|
||||
/** @var null|Node\Expr Condition (null for default) */
|
||||
public ?Node\Expr $cond;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a case node.
|
||||
*
|
||||
* @param null|Node\Expr $cond Condition (null for default)
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Case';
|
||||
}
|
||||
}
|
40
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php
vendored
Normal file
40
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Catch_ extends Node\Stmt {
|
||||
/** @var Node\Name[] Types of exceptions to catch */
|
||||
public array $types;
|
||||
/** @var Expr\Variable|null Variable for exception */
|
||||
public ?Expr\Variable $var;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a catch node.
|
||||
*
|
||||
* @param Node\Name[] $types Types of exceptions to catch
|
||||
* @param Expr\Variable|null $var Variable for exception
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(
|
||||
array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = []
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->types = $types;
|
||||
$this->var = $var;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['types', 'var', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Catch';
|
||||
}
|
||||
}
|
77
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php
vendored
Normal file
77
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Modifiers;
|
||||
use PhpParser\Node;
|
||||
|
||||
class ClassConst extends Node\Stmt {
|
||||
/** @var int Modifiers */
|
||||
public int $flags;
|
||||
/** @var Node\Const_[] Constant declarations */
|
||||
public array $consts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
/** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */
|
||||
public ?Node $type;
|
||||
|
||||
/**
|
||||
* Constructs a class const list node.
|
||||
*
|
||||
* @param Node\Const_[] $consts Constant declarations
|
||||
* @param int $flags Modifiers
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
* @param list<Node\AttributeGroup> $attrGroups PHP attribute groups
|
||||
* @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration
|
||||
*/
|
||||
public function __construct(
|
||||
array $consts,
|
||||
int $flags = 0,
|
||||
array $attributes = [],
|
||||
array $attrGroups = [],
|
||||
?Node $type = null
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->flags = $flags;
|
||||
$this->consts = $consts;
|
||||
$this->attrGroups = $attrGroups;
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'flags', 'type', 'consts'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether constant is explicitly or implicitly public.
|
||||
*/
|
||||
public function isPublic(): bool {
|
||||
return ($this->flags & Modifiers::PUBLIC) !== 0
|
||||
|| ($this->flags & Modifiers::VISIBILITY_MASK) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether constant is protected.
|
||||
*/
|
||||
public function isProtected(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PROTECTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether constant is private.
|
||||
*/
|
||||
public function isPrivate(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PRIVATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether constant is final.
|
||||
*/
|
||||
public function isFinal(): bool {
|
||||
return (bool) ($this->flags & Modifiers::FINAL);
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_ClassConst';
|
||||
}
|
||||
}
|
109
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
vendored
Normal file
109
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\PropertyItem;
|
||||
|
||||
abstract class ClassLike extends Node\Stmt {
|
||||
/** @var Node\Identifier|null Name */
|
||||
public ?Node\Identifier $name;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/** @var Node\Name|null Namespaced name (if using NameResolver) */
|
||||
public ?Node\Name $namespacedName;
|
||||
|
||||
/**
|
||||
* @return TraitUse[]
|
||||
*/
|
||||
public function getTraitUses(): array {
|
||||
$traitUses = [];
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof TraitUse) {
|
||||
$traitUses[] = $stmt;
|
||||
}
|
||||
}
|
||||
return $traitUses;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ClassConst[]
|
||||
*/
|
||||
public function getConstants(): array {
|
||||
$constants = [];
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof ClassConst) {
|
||||
$constants[] = $stmt;
|
||||
}
|
||||
}
|
||||
return $constants;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Property[]
|
||||
*/
|
||||
public function getProperties(): array {
|
||||
$properties = [];
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof Property) {
|
||||
$properties[] = $stmt;
|
||||
}
|
||||
}
|
||||
return $properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets property with the given name defined directly in this class/interface/trait.
|
||||
*
|
||||
* @param string $name Name of the property
|
||||
*
|
||||
* @return Property|null Property node or null if the property does not exist
|
||||
*/
|
||||
public function getProperty(string $name): ?Property {
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof Property) {
|
||||
foreach ($stmt->props as $prop) {
|
||||
if ($prop instanceof PropertyItem && $name === $prop->name->toString()) {
|
||||
return $stmt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all methods defined directly in this class/interface/trait
|
||||
*
|
||||
* @return ClassMethod[]
|
||||
*/
|
||||
public function getMethods(): array {
|
||||
$methods = [];
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof ClassMethod) {
|
||||
$methods[] = $stmt;
|
||||
}
|
||||
}
|
||||
return $methods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets method with the given name defined directly in this class/interface/trait.
|
||||
*
|
||||
* @param string $name Name of the method (compared case-insensitively)
|
||||
*
|
||||
* @return ClassMethod|null Method node or null if the method does not exist
|
||||
*/
|
||||
public function getMethod(string $name): ?ClassMethod {
|
||||
$lowerName = strtolower($name);
|
||||
foreach ($this->stmts as $stmt) {
|
||||
if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
|
||||
return $stmt;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
154
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
vendored
Normal file
154
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Modifiers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
|
||||
class ClassMethod extends Node\Stmt implements FunctionLike {
|
||||
/** @var int Flags */
|
||||
public int $flags;
|
||||
/** @var bool Whether to return by reference */
|
||||
public bool $byRef;
|
||||
/** @var Node\Identifier Name */
|
||||
public Node\Identifier $name;
|
||||
/** @var Node\Param[] Parameters */
|
||||
public array $params;
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
|
||||
public ?Node $returnType;
|
||||
/** @var Node\Stmt[]|null Statements */
|
||||
public ?array $stmts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/** @var array<string, bool> */
|
||||
private static array $magicNames = [
|
||||
'__construct' => true,
|
||||
'__destruct' => true,
|
||||
'__call' => true,
|
||||
'__callstatic' => true,
|
||||
'__get' => true,
|
||||
'__set' => true,
|
||||
'__isset' => true,
|
||||
'__unset' => true,
|
||||
'__sleep' => true,
|
||||
'__wakeup' => true,
|
||||
'__tostring' => true,
|
||||
'__set_state' => true,
|
||||
'__clone' => true,
|
||||
'__invoke' => true,
|
||||
'__debuginfo' => true,
|
||||
'__serialize' => true,
|
||||
'__unserialize' => true,
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs a class method node.
|
||||
*
|
||||
* @param string|Node\Identifier $name Name
|
||||
* @param array{
|
||||
* flags?: int,
|
||||
* byRef?: bool,
|
||||
* params?: Node\Param[],
|
||||
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
|
||||
* stmts?: Node\Stmt[]|null,
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'flags => 0 : Flags
|
||||
* 'byRef' => false : Whether to return by reference
|
||||
* 'params' => array() : Parameters
|
||||
* 'returnType' => null : Return type
|
||||
* 'stmts' => array() : Statements
|
||||
* 'attrGroups' => array() : PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->params = $subNodes['params'] ?? [];
|
||||
$this->returnType = $subNodes['returnType'] ?? null;
|
||||
$this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
|
||||
}
|
||||
|
||||
public function returnsByRef(): bool {
|
||||
return $this->byRef;
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function getReturnType() {
|
||||
return $this->returnType;
|
||||
}
|
||||
|
||||
public function getStmts(): ?array {
|
||||
return $this->stmts;
|
||||
}
|
||||
|
||||
public function getAttrGroups(): array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is explicitly or implicitly public.
|
||||
*/
|
||||
public function isPublic(): bool {
|
||||
return ($this->flags & Modifiers::PUBLIC) !== 0
|
||||
|| ($this->flags & Modifiers::VISIBILITY_MASK) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is protected.
|
||||
*/
|
||||
public function isProtected(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PROTECTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is private.
|
||||
*/
|
||||
public function isPrivate(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PRIVATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is abstract.
|
||||
*/
|
||||
public function isAbstract(): bool {
|
||||
return (bool) ($this->flags & Modifiers::ABSTRACT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is final.
|
||||
*/
|
||||
public function isFinal(): bool {
|
||||
return (bool) ($this->flags & Modifiers::FINAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is static.
|
||||
*/
|
||||
public function isStatic(): bool {
|
||||
return (bool) ($this->flags & Modifiers::STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is magic.
|
||||
*/
|
||||
public function isMagic(): bool {
|
||||
return isset(self::$magicNames[$this->name->toLowerString()]);
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_ClassMethod';
|
||||
}
|
||||
}
|
94
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
vendored
Normal file
94
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Modifiers;
|
||||
use PhpParser\Node;
|
||||
|
||||
class Class_ extends ClassLike {
|
||||
/** @deprecated Use Modifiers::PUBLIC instead */
|
||||
public const MODIFIER_PUBLIC = 1;
|
||||
/** @deprecated Use Modifiers::PROTECTED instead */
|
||||
public const MODIFIER_PROTECTED = 2;
|
||||
/** @deprecated Use Modifiers::PRIVATE instead */
|
||||
public const MODIFIER_PRIVATE = 4;
|
||||
/** @deprecated Use Modifiers::STATIC instead */
|
||||
public const MODIFIER_STATIC = 8;
|
||||
/** @deprecated Use Modifiers::ABSTRACT instead */
|
||||
public const MODIFIER_ABSTRACT = 16;
|
||||
/** @deprecated Use Modifiers::FINAL instead */
|
||||
public const MODIFIER_FINAL = 32;
|
||||
/** @deprecated Use Modifiers::READONLY instead */
|
||||
public const MODIFIER_READONLY = 64;
|
||||
|
||||
/** @deprecated Use Modifiers::VISIBILITY_MASK instead */
|
||||
public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4
|
||||
|
||||
/** @var int Modifiers */
|
||||
public int $flags;
|
||||
/** @var null|Node\Name Name of extended class */
|
||||
public ?Node\Name $extends;
|
||||
/** @var Node\Name[] Names of implemented interfaces */
|
||||
public array $implements;
|
||||
|
||||
/**
|
||||
* Constructs a class node.
|
||||
*
|
||||
* @param string|Node\Identifier|null $name Name
|
||||
* @param array{
|
||||
* flags?: int,
|
||||
* extends?: Node\Name|null,
|
||||
* implements?: Node\Name[],
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'flags' => 0 : Flags
|
||||
* 'extends' => null : Name of extended class
|
||||
* 'implements' => array(): Names of implemented interfaces
|
||||
* 'stmts' => array(): Statements
|
||||
* 'attrGroups' => array(): PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->extends = $subNodes['extends'] ?? null;
|
||||
$this->implements = $subNodes['implements'] ?? [];
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the class is explicitly abstract.
|
||||
*/
|
||||
public function isAbstract(): bool {
|
||||
return (bool) ($this->flags & Modifiers::ABSTRACT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the class is final.
|
||||
*/
|
||||
public function isFinal(): bool {
|
||||
return (bool) ($this->flags & Modifiers::FINAL);
|
||||
}
|
||||
|
||||
public function isReadonly(): bool {
|
||||
return (bool) ($this->flags & Modifiers::READONLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the class is anonymous.
|
||||
*/
|
||||
public function isAnonymous(): bool {
|
||||
return null === $this->name;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Class';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Const_ extends Node\Stmt {
|
||||
/** @var Node\Const_[] Constant declarations */
|
||||
public array $consts;
|
||||
|
||||
/**
|
||||
* Constructs a const list node.
|
||||
*
|
||||
* @param Node\Const_[] $consts Constant declarations
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $consts, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->consts = $consts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['consts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Const';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Continue_ extends Node\Stmt {
|
||||
/** @var null|Node\Expr Number of loops to continue */
|
||||
public ?Node\Expr $num;
|
||||
|
||||
/**
|
||||
* Constructs a continue node.
|
||||
*
|
||||
* @param null|Node\Expr $num Number of loops to continue
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Expr $num = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->num = $num;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['num'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Continue';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../DeclareItem.php';
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\DeclareItem;
|
||||
|
||||
class Declare_ extends Node\Stmt {
|
||||
/** @var DeclareItem[] List of declares */
|
||||
public array $declares;
|
||||
/** @var Node\Stmt[]|null Statements */
|
||||
public ?array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a declare node.
|
||||
*
|
||||
* @param DeclareItem[] $declares List of declares
|
||||
* @param Node\Stmt[]|null $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $declares, ?array $stmts = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->declares = $declares;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['declares', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Declare';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Do_ extends Node\Stmt {
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var Node\Expr Condition */
|
||||
public Node\Expr $cond;
|
||||
|
||||
/**
|
||||
* Constructs a do while node.
|
||||
*
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['stmts', 'cond'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Do';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Echo_ extends Node\Stmt {
|
||||
/** @var Node\Expr[] Expressions */
|
||||
public array $exprs;
|
||||
|
||||
/**
|
||||
* Constructs an echo node.
|
||||
*
|
||||
* @param Node\Expr[] $exprs Expressions
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $exprs, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->exprs = $exprs;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['exprs'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Echo';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class ElseIf_ extends Node\Stmt {
|
||||
/** @var Node\Expr Condition */
|
||||
public Node\Expr $cond;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs an elseif node.
|
||||
*
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_ElseIf';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Else_ extends Node\Stmt {
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs an else node.
|
||||
*
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Else';
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\AttributeGroup;
|
||||
|
||||
class EnumCase extends Node\Stmt {
|
||||
/** @var Node\Identifier Enum case name */
|
||||
public Node\Identifier $name;
|
||||
/** @var Node\Expr|null Enum case expression */
|
||||
public ?Node\Expr $expr;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/**
|
||||
* @param string|Node\Identifier $name Enum case name
|
||||
* @param Node\Expr|null $expr Enum case expression
|
||||
* @param list<AttributeGroup> $attrGroups PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) {
|
||||
parent::__construct($attributes);
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->expr = $expr;
|
||||
$this->attrGroups = $attrGroups;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'name', 'expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_EnumCase';
|
||||
}
|
||||
}
|
44
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php
vendored
Normal file
44
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Enum_ extends ClassLike {
|
||||
/** @var null|Node\Identifier Scalar Type */
|
||||
public ?Node $scalarType;
|
||||
/** @var Node\Name[] Names of implemented interfaces */
|
||||
public array $implements;
|
||||
|
||||
/**
|
||||
* @param string|Node\Identifier|null $name Name
|
||||
* @param array{
|
||||
* scalarType?: Node\Identifier|null,
|
||||
* implements?: Node\Name[],
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'scalarType' => null : Scalar type
|
||||
* 'implements' => array() : Names of implemented interfaces
|
||||
* 'stmts' => array() : Statements
|
||||
* 'attrGroups' => array() : PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->scalarType = $subNodes['scalarType'] ?? null;
|
||||
$this->implements = $subNodes['implements'] ?? [];
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
|
||||
parent::__construct($attributes);
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Enum';
|
||||
}
|
||||
}
|
32
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php
vendored
Normal file
32
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
/**
|
||||
* Represents statements of type "expr;"
|
||||
*/
|
||||
class Expression extends Node\Stmt {
|
||||
/** @var Node\Expr Expression */
|
||||
public Node\Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs an expression statement.
|
||||
*
|
||||
* @param Node\Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Expression';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Finally_ extends Node\Stmt {
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a finally node.
|
||||
*
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Finally';
|
||||
}
|
||||
}
|
47
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php
vendored
Normal file
47
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class For_ extends Node\Stmt {
|
||||
/** @var Node\Expr[] Init expressions */
|
||||
public array $init;
|
||||
/** @var Node\Expr[] Loop conditions */
|
||||
public array $cond;
|
||||
/** @var Node\Expr[] Loop expressions */
|
||||
public array $loop;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a for loop node.
|
||||
*
|
||||
* @param array{
|
||||
* init?: Node\Expr[],
|
||||
* cond?: Node\Expr[],
|
||||
* loop?: Node\Expr[],
|
||||
* stmts?: Node\Stmt[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'init' => array(): Init expressions
|
||||
* 'cond' => array(): Loop conditions
|
||||
* 'loop' => array(): Loop expressions
|
||||
* 'stmts' => array(): Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->init = $subNodes['init'] ?? [];
|
||||
$this->cond = $subNodes['cond'] ?? [];
|
||||
$this->loop = $subNodes['loop'] ?? [];
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['init', 'cond', 'loop', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_For';
|
||||
}
|
||||
}
|
50
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php
vendored
Normal file
50
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Foreach_ extends Node\Stmt {
|
||||
/** @var Node\Expr Expression to iterate */
|
||||
public Node\Expr $expr;
|
||||
/** @var null|Node\Expr Variable to assign key to */
|
||||
public ?Node\Expr $keyVar;
|
||||
/** @var bool Whether to assign value by reference */
|
||||
public bool $byRef;
|
||||
/** @var Node\Expr Variable to assign value to */
|
||||
public Node\Expr $valueVar;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a foreach node.
|
||||
*
|
||||
* @param Node\Expr $expr Expression to iterate
|
||||
* @param Node\Expr $valueVar Variable to assign value to
|
||||
* @param array{
|
||||
* keyVar?: Node\Expr|null,
|
||||
* byRef?: bool,
|
||||
* stmts?: Node\Stmt[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'keyVar' => null : Variable to assign key to
|
||||
* 'byRef' => false : Whether to assign value by reference
|
||||
* 'stmts' => array(): Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
$this->keyVar = $subNodes['keyVar'] ?? null;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->valueVar = $valueVar;
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Foreach';
|
||||
}
|
||||
}
|
81
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
vendored
Normal file
81
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
|
||||
class Function_ extends Node\Stmt implements FunctionLike {
|
||||
/** @var bool Whether function returns by reference */
|
||||
public bool $byRef;
|
||||
/** @var Node\Identifier Name */
|
||||
public Node\Identifier $name;
|
||||
/** @var Node\Param[] Parameters */
|
||||
public array $params;
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
|
||||
public ?Node $returnType;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/** @var Node\Name|null Namespaced name (if using NameResolver) */
|
||||
public ?Node\Name $namespacedName;
|
||||
|
||||
/**
|
||||
* Constructs a function node.
|
||||
*
|
||||
* @param string|Node\Identifier $name Name
|
||||
* @param array{
|
||||
* byRef?: bool,
|
||||
* params?: Node\Param[],
|
||||
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'byRef' => false : Whether to return by reference
|
||||
* 'params' => array(): Parameters
|
||||
* 'returnType' => null : Return type
|
||||
* 'stmts' => array(): Statements
|
||||
* 'attrGroups' => array(): PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->params = $subNodes['params'] ?? [];
|
||||
$this->returnType = $subNodes['returnType'] ?? null;
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts'];
|
||||
}
|
||||
|
||||
public function returnsByRef(): bool {
|
||||
return $this->byRef;
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function getReturnType() {
|
||||
return $this->returnType;
|
||||
}
|
||||
|
||||
public function getAttrGroups(): array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
/** @return Node\Stmt[] */
|
||||
public function getStmts(): array {
|
||||
return $this->stmts;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Function';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Global_ extends Node\Stmt {
|
||||
/** @var Node\Expr[] Variables */
|
||||
public array $vars;
|
||||
|
||||
/**
|
||||
* Constructs a global variables list node.
|
||||
*
|
||||
* @param Node\Expr[] $vars Variables to unset
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $vars, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->vars = $vars;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['vars'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Global';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Goto_ extends Stmt {
|
||||
/** @var Identifier Name of label to jump to */
|
||||
public Identifier $name;
|
||||
|
||||
/**
|
||||
* Constructs a goto node.
|
||||
*
|
||||
* @param string|Identifier $name Name of label to jump to
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Goto';
|
||||
}
|
||||
}
|
41
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php
vendored
Normal file
41
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\UseItem;
|
||||
|
||||
class GroupUse extends Stmt {
|
||||
/**
|
||||
* @var Use_::TYPE_* Type of group use
|
||||
*/
|
||||
public int $type;
|
||||
/** @var Name Prefix for uses */
|
||||
public Name $prefix;
|
||||
/** @var UseItem[] Uses */
|
||||
public array $uses;
|
||||
|
||||
/**
|
||||
* Constructs a group use node.
|
||||
*
|
||||
* @param Name $prefix Prefix for uses
|
||||
* @param UseItem[] $uses Uses
|
||||
* @param Use_::TYPE_* $type Type of group use
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->type = $type;
|
||||
$this->prefix = $prefix;
|
||||
$this->uses = $uses;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['type', 'prefix', 'uses'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_GroupUse';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class HaltCompiler extends Stmt {
|
||||
/** @var string Remaining text after halt compiler statement. */
|
||||
public string $remaining;
|
||||
|
||||
/**
|
||||
* Constructs a __halt_compiler node.
|
||||
*
|
||||
* @param string $remaining Remaining text after halt compiler statement.
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(string $remaining, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->remaining = $remaining;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['remaining'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_HaltCompiler';
|
||||
}
|
||||
}
|
46
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
vendored
Normal file
46
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class If_ extends Node\Stmt {
|
||||
/** @var Node\Expr Condition expression */
|
||||
public Node\Expr $cond;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var ElseIf_[] Elseif clauses */
|
||||
public array $elseifs;
|
||||
/** @var null|Else_ Else clause */
|
||||
public ?Else_ $else;
|
||||
|
||||
/**
|
||||
* Constructs an if node.
|
||||
*
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param array{
|
||||
* stmts?: Node\Stmt[],
|
||||
* elseifs?: ElseIf_[],
|
||||
* else?: Else_|null,
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'stmts' => array(): Statements
|
||||
* 'elseifs' => array(): Elseif clauses
|
||||
* 'else' => null : Else clause
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->elseifs = $subNodes['elseifs'] ?? [];
|
||||
$this->else = $subNodes['else'] ?? null;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'stmts', 'elseifs', 'else'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_If';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class InlineHTML extends Stmt {
|
||||
/** @var string String */
|
||||
public string $value;
|
||||
|
||||
/**
|
||||
* Constructs an inline HTML node.
|
||||
*
|
||||
* @param string $value String
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(string $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['value'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_InlineHTML';
|
||||
}
|
||||
}
|
40
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php
vendored
Normal file
40
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Interface_ extends ClassLike {
|
||||
/** @var Node\Name[] Extended interfaces */
|
||||
public array $extends;
|
||||
|
||||
/**
|
||||
* Constructs a class node.
|
||||
*
|
||||
* @param string|Node\Identifier $name Name
|
||||
* @param array{
|
||||
* extends?: Node\Name[],
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'extends' => array(): Name of extended interfaces
|
||||
* 'stmts' => array(): Statements
|
||||
* 'attrGroups' => array(): PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->extends = $subNodes['extends'] ?? [];
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'name', 'extends', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Interface';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Label extends Stmt {
|
||||
/** @var Identifier Name */
|
||||
public Identifier $name;
|
||||
|
||||
/**
|
||||
* Constructs a label node.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Label';
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Namespace_ extends Node\Stmt {
|
||||
/* For use in the "kind" attribute */
|
||||
public const KIND_SEMICOLON = 1;
|
||||
public const KIND_BRACED = 2;
|
||||
|
||||
/** @var null|Node\Name Name */
|
||||
public ?Node\Name $name;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a namespace node.
|
||||
*
|
||||
* @param null|Node\Name $name Name
|
||||
* @param null|Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['name', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Namespace';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
/** Nop/empty statement (;). */
|
||||
class Nop extends Node\Stmt {
|
||||
public function getSubNodeNames(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Nop';
|
||||
}
|
||||
}
|
82
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php
vendored
Normal file
82
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Modifiers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\ComplexType;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\PropertyItem;
|
||||
|
||||
class Property extends Node\Stmt {
|
||||
/** @var int Modifiers */
|
||||
public int $flags;
|
||||
/** @var PropertyItem[] Properties */
|
||||
public array $props;
|
||||
/** @var null|Identifier|Name|ComplexType Type declaration */
|
||||
public ?Node $type;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public array $attrGroups;
|
||||
|
||||
/**
|
||||
* Constructs a class property list node.
|
||||
*
|
||||
* @param int $flags Modifiers
|
||||
* @param PropertyItem[] $props Properties
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
* @param null|Identifier|Name|ComplexType $type Type declaration
|
||||
* @param Node\AttributeGroup[] $attrGroups PHP attribute groups
|
||||
*/
|
||||
public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->flags = $flags;
|
||||
$this->props = $props;
|
||||
$this->type = $type;
|
||||
$this->attrGroups = $attrGroups;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'flags', 'type', 'props'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the property is explicitly or implicitly public.
|
||||
*/
|
||||
public function isPublic(): bool {
|
||||
return ($this->flags & Modifiers::PUBLIC) !== 0
|
||||
|| ($this->flags & Modifiers::VISIBILITY_MASK) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the property is protected.
|
||||
*/
|
||||
public function isProtected(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PROTECTED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the property is private.
|
||||
*/
|
||||
public function isPrivate(): bool {
|
||||
return (bool) ($this->flags & Modifiers::PRIVATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the property is static.
|
||||
*/
|
||||
public function isStatic(): bool {
|
||||
return (bool) ($this->flags & Modifiers::STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the property is readonly.
|
||||
*/
|
||||
public function isReadonly(): bool {
|
||||
return (bool) ($this->flags & Modifiers::READONLY);
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Property';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../PropertyItem.php';
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Return_ extends Node\Stmt {
|
||||
/** @var null|Node\Expr Expression */
|
||||
public ?Node\Expr $expr;
|
||||
|
||||
/**
|
||||
* Constructs a return node.
|
||||
*
|
||||
* @param null|Node\Expr $expr Expression
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Expr $expr = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['expr'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Return';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../StaticVar.php';
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\StaticVar;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Static_ extends Stmt {
|
||||
/** @var StaticVar[] Variable definitions */
|
||||
public array $vars;
|
||||
|
||||
/**
|
||||
* Constructs a static variables list node.
|
||||
*
|
||||
* @param StaticVar[] $vars Variable definitions
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $vars, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->vars = $vars;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['vars'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Static';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Switch_ extends Node\Stmt {
|
||||
/** @var Node\Expr Condition */
|
||||
public Node\Expr $cond;
|
||||
/** @var Case_[] Case list */
|
||||
public array $cases;
|
||||
|
||||
/**
|
||||
* Constructs a case node.
|
||||
*
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param Case_[] $cases Case list
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $cases, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->cases = $cases;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'cases'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Switch';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class TraitUse extends Node\Stmt {
|
||||
/** @var Node\Name[] Traits */
|
||||
public array $traits;
|
||||
/** @var TraitUseAdaptation[] Adaptations */
|
||||
public array $adaptations;
|
||||
|
||||
/**
|
||||
* Constructs a trait use node.
|
||||
*
|
||||
* @param Node\Name[] $traits Traits
|
||||
* @param TraitUseAdaptation[] $adaptations Adaptations
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $traits, array $adaptations = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->traits = $traits;
|
||||
$this->adaptations = $adaptations;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['traits', 'adaptations'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_TraitUse';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
abstract class TraitUseAdaptation extends Node\Stmt {
|
||||
/** @var Node\Name|null Trait name */
|
||||
public ?Node\Name $trait;
|
||||
/** @var Node\Identifier Method name */
|
||||
public Node\Identifier $method;
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt\TraitUseAdaptation;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Alias extends Node\Stmt\TraitUseAdaptation {
|
||||
/** @var null|int New modifier */
|
||||
public ?int $newModifier;
|
||||
/** @var null|Node\Identifier New name */
|
||||
public ?Node\Identifier $newName;
|
||||
|
||||
/**
|
||||
* Constructs a trait use precedence adaptation node.
|
||||
*
|
||||
* @param null|Node\Name $trait Trait name
|
||||
* @param string|Node\Identifier $method Method name
|
||||
* @param null|int $newModifier New modifier
|
||||
* @param null|string|Node\Identifier $newName New name
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->trait = $trait;
|
||||
$this->method = \is_string($method) ? new Node\Identifier($method) : $method;
|
||||
$this->newModifier = $newModifier;
|
||||
$this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['trait', 'method', 'newModifier', 'newName'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_TraitUseAdaptation_Alias';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt\TraitUseAdaptation;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Precedence extends Node\Stmt\TraitUseAdaptation {
|
||||
/** @var Node\Name[] Overwritten traits */
|
||||
public array $insteadof;
|
||||
|
||||
/**
|
||||
* Constructs a trait use precedence adaptation node.
|
||||
*
|
||||
* @param Node\Name $trait Trait name
|
||||
* @param string|Node\Identifier $method Method name
|
||||
* @param Node\Name[] $insteadof Overwritten traits
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->trait = $trait;
|
||||
$this->method = \is_string($method) ? new Node\Identifier($method) : $method;
|
||||
$this->insteadof = $insteadof;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['trait', 'method', 'insteadof'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_TraitUseAdaptation_Precedence';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Trait_ extends ClassLike {
|
||||
/**
|
||||
* Constructs a trait node.
|
||||
*
|
||||
* @param string|Node\Identifier $name Name
|
||||
* @param array{
|
||||
* stmts?: Node\Stmt[],
|
||||
* attrGroups?: Node\AttributeGroup[],
|
||||
* } $subNodes Array of the following optional subnodes:
|
||||
* 'stmts' => array(): Statements
|
||||
* 'attrGroups' => array(): PHP attribute groups
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
||||
$this->stmts = $subNodes['stmts'] ?? [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['attrGroups', 'name', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Trait';
|
||||
}
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class TryCatch extends Node\Stmt {
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
/** @var Catch_[] Catches */
|
||||
public array $catches;
|
||||
/** @var null|Finally_ Optional finally node */
|
||||
public ?Finally_ $finally;
|
||||
|
||||
/**
|
||||
* Constructs a try catch node.
|
||||
*
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param Catch_[] $catches Catches
|
||||
* @param null|Finally_ $finally Optional finally node
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->stmts = $stmts;
|
||||
$this->catches = $catches;
|
||||
$this->finally = $finally;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['stmts', 'catches', 'finally'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_TryCatch';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class Unset_ extends Node\Stmt {
|
||||
/** @var Node\Expr[] Variables to unset */
|
||||
public array $vars;
|
||||
|
||||
/**
|
||||
* Constructs an unset node.
|
||||
*
|
||||
* @param Node\Expr[] $vars Variables to unset
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $vars, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->vars = $vars;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['vars'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Unset';
|
||||
}
|
||||
}
|
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php
vendored
Normal file
3
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../UseItem.php';
|
47
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
vendored
Normal file
47
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\UseItem;
|
||||
|
||||
class Use_ extends Stmt {
|
||||
/**
|
||||
* Unknown type. Both Stmt\Use_ / Stmt\GroupUse and Stmt\UseUse have a $type property, one of them will always be
|
||||
* TYPE_UNKNOWN while the other has one of the three other possible types. For normal use statements the type on the
|
||||
* Stmt\UseUse is unknown. It's only the other way around for mixed group use declarations.
|
||||
*/
|
||||
public const TYPE_UNKNOWN = 0;
|
||||
/** Class or namespace import */
|
||||
public const TYPE_NORMAL = 1;
|
||||
/** Function import */
|
||||
public const TYPE_FUNCTION = 2;
|
||||
/** Constant import */
|
||||
public const TYPE_CONSTANT = 3;
|
||||
|
||||
/** @var self::TYPE_* Type of alias */
|
||||
public int $type;
|
||||
/** @var UseItem[] Aliases */
|
||||
public array $uses;
|
||||
|
||||
/**
|
||||
* Constructs an alias (use) list node.
|
||||
*
|
||||
* @param UseItem[] $uses Aliases
|
||||
* @param Stmt\Use_::TYPE_* $type Type of alias
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->type = $type;
|
||||
$this->uses = $uses;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['type', 'uses'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_Use';
|
||||
}
|
||||
}
|
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php
vendored
Normal file
33
vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Stmt;
|
||||
|
||||
use PhpParser\Node;
|
||||
|
||||
class While_ extends Node\Stmt {
|
||||
/** @var Node\Expr Condition */
|
||||
public Node\Expr $cond;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public array $stmts;
|
||||
|
||||
/**
|
||||
* Constructs a while node.
|
||||
*
|
||||
* @param Node\Expr $cond Condition
|
||||
* @param Node\Stmt[] $stmts Statements
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->cond = $cond;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['cond', 'stmts'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'Stmt_While';
|
||||
}
|
||||
}
|
27
vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
class UnionType extends ComplexType {
|
||||
/** @var (Identifier|Name|IntersectionType)[] Types */
|
||||
public array $types;
|
||||
|
||||
/**
|
||||
* Constructs a union type.
|
||||
*
|
||||
* @param (Identifier|Name|IntersectionType)[] $types Types
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $types, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->types = $types;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['types'];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'UnionType';
|
||||
}
|
||||
}
|
55
vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php
vendored
Normal file
55
vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
use PhpParser\Node\Stmt\Use_;
|
||||
|
||||
class UseItem extends NodeAbstract {
|
||||
/**
|
||||
* @var Use_::TYPE_* One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses
|
||||
*/
|
||||
public int $type;
|
||||
/** @var Node\Name Namespace, class, function or constant to alias */
|
||||
public Name $name;
|
||||
/** @var Identifier|null Alias */
|
||||
public ?Identifier $alias;
|
||||
|
||||
/**
|
||||
* Constructs an alias (use) item node.
|
||||
*
|
||||
* @param Node\Name $name Namespace/Class to alias
|
||||
* @param null|string|Identifier $alias Alias
|
||||
* @param Use_::TYPE_* $type Type of the use element (for mixed group use only)
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->type = $type;
|
||||
$this->name = $name;
|
||||
$this->alias = \is_string($alias) ? new Identifier($alias) : $alias;
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return ['type', 'name', 'alias'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get alias. If not explicitly given this is the last component of the used name.
|
||||
*/
|
||||
public function getAlias(): Identifier {
|
||||
if (null !== $this->alias) {
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
return new Identifier($this->name->getLast());
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'UseItem';
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated compatibility alias
|
||||
class_alias(UseItem::class, Stmt\UseUse::class);
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
/**
|
||||
* Represents a name that is written in source code with a leading dollar,
|
||||
* but is not a proper variable. The leading dollar is not stored as part of the name.
|
||||
*
|
||||
* Examples: Names in property declarations are formatted as variables. Names in static property
|
||||
* lookups are also formatted as variables.
|
||||
*/
|
||||
class VarLikeIdentifier extends Identifier {
|
||||
public function getType(): string {
|
||||
return 'VarLikeIdentifier';
|
||||
}
|
||||
}
|
27
vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
/**
|
||||
* Represents the "..." in "foo(...)" of the first-class callable syntax.
|
||||
*/
|
||||
class VariadicPlaceholder extends NodeAbstract {
|
||||
/**
|
||||
* Create a variadic argument placeholder (first-class callable syntax).
|
||||
*
|
||||
* @param array<string, mixed> $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return 'VariadicPlaceholder';
|
||||
}
|
||||
|
||||
public function getSubNodeNames(): array {
|
||||
return [];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user