@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Plus extends BinaryOp |
| 8 | 8 | { |
| 9 | - public function getOperatorSigil() : string { |
|
| 10 | - return '+'; |
|
| 11 | - } |
|
| 9 | + public function getOperatorSigil() : string { |
|
| 10 | + return '+'; |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public function getType() : string { |
|
| 14 | - return 'Expr_BinaryOp_Plus'; |
|
| 15 | - } |
|
| 13 | + public function getType() : string { |
|
| 14 | + return 'Expr_BinaryOp_Plus'; |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr\BinaryOp; |
| 6 | 6 | |
| 7 | -class Plus extends BinaryOp |
|
| 8 | -{ |
|
| 7 | +class Plus extends BinaryOp { |
|
| 9 | 8 | public function getOperatorSigil() : string { |
| 10 | 9 | return '+'; |
| 11 | 10 | } |
@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | class NotEqual extends BinaryOp |
| 8 | 8 | { |
| 9 | - public function getOperatorSigil() : string { |
|
| 10 | - return '!='; |
|
| 11 | - } |
|
| 9 | + public function getOperatorSigil() : string { |
|
| 10 | + return '!='; |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public function getType() : string { |
|
| 14 | - return 'Expr_BinaryOp_NotEqual'; |
|
| 15 | - } |
|
| 13 | + public function getType() : string { |
|
| 14 | + return 'Expr_BinaryOp_NotEqual'; |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr\BinaryOp; |
| 6 | 6 | |
| 7 | -class NotEqual extends BinaryOp |
|
| 8 | -{ |
|
| 7 | +class NotEqual extends BinaryOp { |
|
| 9 | 8 | public function getOperatorSigil() : string { |
| 10 | 9 | return '!='; |
| 11 | 10 | } |
@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | class BitwiseAnd extends BinaryOp |
| 8 | 8 | { |
| 9 | - public function getOperatorSigil() : string { |
|
| 10 | - return '&'; |
|
| 11 | - } |
|
| 9 | + public function getOperatorSigil() : string { |
|
| 10 | + return '&'; |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public function getType() : string { |
|
| 14 | - return 'Expr_BinaryOp_BitwiseAnd'; |
|
| 15 | - } |
|
| 13 | + public function getType() : string { |
|
| 14 | + return 'Expr_BinaryOp_BitwiseAnd'; |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr\BinaryOp; |
| 6 | 6 | |
| 7 | -class BitwiseAnd extends BinaryOp |
|
| 8 | -{ |
|
| 7 | +class BitwiseAnd extends BinaryOp { |
|
| 9 | 8 | public function getOperatorSigil() : string { |
| 10 | 9 | return '&'; |
| 11 | 10 | } |
@@ -6,11 +6,11 @@ |
||
| 6 | 6 | |
| 7 | 7 | class BitwiseOr extends BinaryOp |
| 8 | 8 | { |
| 9 | - public function getOperatorSigil() : string { |
|
| 10 | - return '|'; |
|
| 11 | - } |
|
| 9 | + public function getOperatorSigil() : string { |
|
| 10 | + return '|'; |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public function getType() : string { |
|
| 14 | - return 'Expr_BinaryOp_BitwiseOr'; |
|
| 15 | - } |
|
| 13 | + public function getType() : string { |
|
| 14 | + return 'Expr_BinaryOp_BitwiseOr'; |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr\BinaryOp; |
| 6 | 6 | |
| 7 | -class BitwiseOr extends BinaryOp |
|
| 8 | -{ |
|
| 7 | +class BitwiseOr extends BinaryOp { |
|
| 9 | 8 | public function getOperatorSigil() : string { |
| 10 | 9 | return '|'; |
| 11 | 10 | } |
@@ -9,33 +9,33 @@ |
||
| 9 | 9 | |
| 10 | 10 | class New_ extends CallLike |
| 11 | 11 | { |
| 12 | - /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ |
|
| 13 | - public $class; |
|
| 14 | - /** @var array<Arg|VariadicPlaceholder> Arguments */ |
|
| 15 | - public $args; |
|
| 12 | + /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ |
|
| 13 | + public $class; |
|
| 14 | + /** @var array<Arg|VariadicPlaceholder> Arguments */ |
|
| 15 | + public $args; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Constructs a function call node. |
|
| 19 | - * |
|
| 20 | - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) |
|
| 21 | - * @param array<Arg|VariadicPlaceholder> $args Arguments |
|
| 22 | - * @param array $attributes Additional attributes |
|
| 23 | - */ |
|
| 24 | - public function __construct($class, array $args = [], array $attributes = []) { |
|
| 25 | - $this->attributes = $attributes; |
|
| 26 | - $this->class = $class; |
|
| 27 | - $this->args = $args; |
|
| 28 | - } |
|
| 17 | + /** |
|
| 18 | + * Constructs a function call node. |
|
| 19 | + * |
|
| 20 | + * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) |
|
| 21 | + * @param array<Arg|VariadicPlaceholder> $args Arguments |
|
| 22 | + * @param array $attributes Additional attributes |
|
| 23 | + */ |
|
| 24 | + public function __construct($class, array $args = [], array $attributes = []) { |
|
| 25 | + $this->attributes = $attributes; |
|
| 26 | + $this->class = $class; |
|
| 27 | + $this->args = $args; |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - public function getSubNodeNames() : array { |
|
| 31 | - return ['class', 'args']; |
|
| 32 | - } |
|
| 30 | + public function getSubNodeNames() : array { |
|
| 31 | + return ['class', 'args']; |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - public function getType() : string { |
|
| 35 | - return 'Expr_New'; |
|
| 36 | - } |
|
| 34 | + public function getType() : string { |
|
| 35 | + return 'Expr_New'; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - public function getRawArgs(): array { |
|
| 39 | - return $this->args; |
|
| 40 | - } |
|
| 38 | + public function getRawArgs(): array { |
|
| 39 | + return $this->args; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use PhpParser\Node\Expr; |
| 8 | 8 | use PhpParser\Node\VariadicPlaceholder; |
| 9 | 9 | |
| 10 | -class New_ extends CallLike |
|
| 11 | -{ |
|
| 10 | +class New_ extends CallLike { |
|
| 12 | 11 | /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ |
| 13 | 12 | public $class; |
| 14 | 13 | /** @var array<Arg|VariadicPlaceholder> Arguments */ |
@@ -6,25 +6,25 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Eval_ extends Expr |
| 8 | 8 | { |
| 9 | - /** @var Expr Expression */ |
|
| 10 | - public $expr; |
|
| 9 | + /** @var Expr Expression */ |
|
| 10 | + public $expr; |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Constructs an eval() node. |
|
| 14 | - * |
|
| 15 | - * @param Expr $expr Expression |
|
| 16 | - * @param array $attributes Additional attributes |
|
| 17 | - */ |
|
| 18 | - public function __construct(Expr $expr, array $attributes = []) { |
|
| 19 | - $this->attributes = $attributes; |
|
| 20 | - $this->expr = $expr; |
|
| 21 | - } |
|
| 12 | + /** |
|
| 13 | + * Constructs an eval() node. |
|
| 14 | + * |
|
| 15 | + * @param Expr $expr Expression |
|
| 16 | + * @param array $attributes Additional attributes |
|
| 17 | + */ |
|
| 18 | + public function __construct(Expr $expr, array $attributes = []) { |
|
| 19 | + $this->attributes = $attributes; |
|
| 20 | + $this->expr = $expr; |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - public function getSubNodeNames() : array { |
|
| 24 | - return ['expr']; |
|
| 25 | - } |
|
| 23 | + public function getSubNodeNames() : array { |
|
| 24 | + return ['expr']; |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function getType() : string { |
|
| 28 | - return 'Expr_Eval'; |
|
| 29 | - } |
|
| 27 | + public function getType() : string { |
|
| 28 | + return 'Expr_Eval'; |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr; |
| 6 | 6 | |
| 7 | -class Eval_ extends Expr |
|
| 8 | -{ |
|
| 7 | +class Eval_ extends Expr { |
|
| 9 | 8 | /** @var Expr Expression */ |
| 10 | 9 | public $expr; |
| 11 | 10 | |
@@ -6,25 +6,25 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PreInc extends Expr |
| 8 | 8 | { |
| 9 | - /** @var Expr Variable */ |
|
| 10 | - public $var; |
|
| 9 | + /** @var Expr Variable */ |
|
| 10 | + public $var; |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Constructs a pre increment node. |
|
| 14 | - * |
|
| 15 | - * @param Expr $var Variable |
|
| 16 | - * @param array $attributes Additional attributes |
|
| 17 | - */ |
|
| 18 | - public function __construct(Expr $var, array $attributes = []) { |
|
| 19 | - $this->attributes = $attributes; |
|
| 20 | - $this->var = $var; |
|
| 21 | - } |
|
| 12 | + /** |
|
| 13 | + * Constructs a pre increment node. |
|
| 14 | + * |
|
| 15 | + * @param Expr $var Variable |
|
| 16 | + * @param array $attributes Additional attributes |
|
| 17 | + */ |
|
| 18 | + public function __construct(Expr $var, array $attributes = []) { |
|
| 19 | + $this->attributes = $attributes; |
|
| 20 | + $this->var = $var; |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - public function getSubNodeNames() : array { |
|
| 24 | - return ['var']; |
|
| 25 | - } |
|
| 23 | + public function getSubNodeNames() : array { |
|
| 24 | + return ['var']; |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function getType() : string { |
|
| 28 | - return 'Expr_PreInc'; |
|
| 29 | - } |
|
| 27 | + public function getType() : string { |
|
| 28 | + return 'Expr_PreInc'; |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr; |
| 6 | 6 | |
| 7 | -class PreInc extends Expr |
|
| 8 | -{ |
|
| 7 | +class PreInc extends Expr { |
|
| 9 | 8 | /** @var Expr Variable */ |
| 10 | 9 | public $var; |
| 11 | 10 | |
@@ -8,29 +8,29 @@ |
||
| 8 | 8 | |
| 9 | 9 | class ClassConstFetch extends Expr |
| 10 | 10 | { |
| 11 | - /** @var Name|Expr Class name */ |
|
| 12 | - public $class; |
|
| 13 | - /** @var Identifier|Expr|Error Constant name */ |
|
| 14 | - public $name; |
|
| 11 | + /** @var Name|Expr Class name */ |
|
| 12 | + public $class; |
|
| 13 | + /** @var Identifier|Expr|Error Constant name */ |
|
| 14 | + public $name; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Constructs a class const fetch node. |
|
| 18 | - * |
|
| 19 | - * @param Name|Expr $class Class name |
|
| 20 | - * @param string|Identifier|Expr|Error $name Constant name |
|
| 21 | - * @param array $attributes Additional attributes |
|
| 22 | - */ |
|
| 23 | - public function __construct($class, $name, array $attributes = []) { |
|
| 24 | - $this->attributes = $attributes; |
|
| 25 | - $this->class = $class; |
|
| 26 | - $this->name = \is_string($name) ? new Identifier($name) : $name; |
|
| 27 | - } |
|
| 16 | + /** |
|
| 17 | + * Constructs a class const fetch node. |
|
| 18 | + * |
|
| 19 | + * @param Name|Expr $class Class name |
|
| 20 | + * @param string|Identifier|Expr|Error $name Constant name |
|
| 21 | + * @param array $attributes Additional attributes |
|
| 22 | + */ |
|
| 23 | + public function __construct($class, $name, array $attributes = []) { |
|
| 24 | + $this->attributes = $attributes; |
|
| 25 | + $this->class = $class; |
|
| 26 | + $this->name = \is_string($name) ? new Identifier($name) : $name; |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function getSubNodeNames() : array { |
|
| 30 | - return ['class', 'name']; |
|
| 31 | - } |
|
| 29 | + public function getSubNodeNames() : array { |
|
| 30 | + return ['class', 'name']; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - public function getType() : string { |
|
| 34 | - return 'Expr_ClassConstFetch'; |
|
| 35 | - } |
|
| 33 | + public function getType() : string { |
|
| 34 | + return 'Expr_ClassConstFetch'; |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use PhpParser\Node\Identifier; |
| 7 | 7 | use PhpParser\Node\Name; |
| 8 | 8 | |
| 9 | -class ClassConstFetch extends Expr |
|
| 10 | -{ |
|
| 9 | +class ClassConstFetch extends Expr { |
|
| 11 | 10 | /** @var Name|Expr Class name */ |
| 12 | 11 | public $class; |
| 13 | 12 | /** @var Identifier|Expr|Error Constant name */ |
@@ -6,25 +6,25 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PostInc extends Expr |
| 8 | 8 | { |
| 9 | - /** @var Expr Variable */ |
|
| 10 | - public $var; |
|
| 9 | + /** @var Expr Variable */ |
|
| 10 | + public $var; |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Constructs a post increment node. |
|
| 14 | - * |
|
| 15 | - * @param Expr $var Variable |
|
| 16 | - * @param array $attributes Additional attributes |
|
| 17 | - */ |
|
| 18 | - public function __construct(Expr $var, array $attributes = []) { |
|
| 19 | - $this->attributes = $attributes; |
|
| 20 | - $this->var = $var; |
|
| 21 | - } |
|
| 12 | + /** |
|
| 13 | + * Constructs a post increment node. |
|
| 14 | + * |
|
| 15 | + * @param Expr $var Variable |
|
| 16 | + * @param array $attributes Additional attributes |
|
| 17 | + */ |
|
| 18 | + public function __construct(Expr $var, array $attributes = []) { |
|
| 19 | + $this->attributes = $attributes; |
|
| 20 | + $this->var = $var; |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - public function getSubNodeNames() : array { |
|
| 24 | - return ['var']; |
|
| 25 | - } |
|
| 23 | + public function getSubNodeNames() : array { |
|
| 24 | + return ['var']; |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function getType() : string { |
|
| 28 | - return 'Expr_PostInc'; |
|
| 29 | - } |
|
| 27 | + public function getType() : string { |
|
| 28 | + return 'Expr_PostInc'; |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpParser\Node\Expr; |
| 6 | 6 | |
| 7 | -class PostInc extends Expr |
|
| 8 | -{ |
|
| 7 | +class PostInc extends Expr { |
|
| 9 | 8 | /** @var Expr Variable */ |
| 10 | 9 | public $var; |
| 11 | 10 | |