@@ -25,15 +25,15 @@ |
||
25 | 25 | * @param array<Arg|VariadicPlaceholder> $args Arguments |
26 | 26 | * @param array $attributes Additional attributes |
27 | 27 | */ |
28 | - public function __construct($class, $name, array $args = [], array $attributes = []) { |
|
28 | + public function __construct( $class, $name, array $args = [ ], array $attributes = [ ] ) { |
|
29 | 29 | $this->attributes = $attributes; |
30 | 30 | $this->class = $class; |
31 | - $this->name = \is_string($name) ? new Identifier($name) : $name; |
|
31 | + $this->name = \is_string( $name ) ? new Identifier( $name ) : $name; |
|
32 | 32 | $this->args = $args; |
33 | 33 | } |
34 | 34 | |
35 | 35 | public function getSubNodeNames() : array { |
36 | - return ['class', 'name', 'args']; |
|
36 | + return [ 'class', 'name', 'args' ]; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function getType() : string { |
@@ -19,13 +19,13 @@ |
||
19 | 19 | * @param null|Expr $expr Expression |
20 | 20 | * @param array $attributes Additional attributes |
21 | 21 | */ |
22 | - public function __construct(Expr $expr = null, array $attributes = []) { |
|
22 | + public function __construct( Expr $expr = null, array $attributes = [ ] ) { |
|
23 | 23 | $this->attributes = $attributes; |
24 | 24 | $this->expr = $expr; |
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getSubNodeNames() : array { |
28 | - return ['expr']; |
|
28 | + return [ 'expr' ]; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function getType() : string { |
@@ -15,13 +15,13 @@ |
||
15 | 15 | * @param string|Expr $name Name |
16 | 16 | * @param array $attributes Additional attributes |
17 | 17 | */ |
18 | - public function __construct($name, array $attributes = []) { |
|
18 | + public function __construct( $name, array $attributes = [ ] ) { |
|
19 | 19 | $this->attributes = $attributes; |
20 | 20 | $this->name = $name; |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getSubNodeNames() : array { |
24 | - return ['name']; |
|
24 | + return [ 'name' ]; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getType() : string { |
@@ -15,14 +15,14 @@ |
||
15 | 15 | /** |
16 | 16 | * @param MatchArm[] $arms |
17 | 17 | */ |
18 | - public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { |
|
18 | + public function __construct( Node\Expr $cond, array $arms = [ ], array $attributes = [ ] ) { |
|
19 | 19 | $this->attributes = $attributes; |
20 | 20 | $this->cond = $cond; |
21 | 21 | $this->arms = $arms; |
22 | 22 | } |
23 | 23 | |
24 | 24 | public function getSubNodeNames() : array { |
25 | - return ['cond', 'arms']; |
|
25 | + return [ 'cond', 'arms' ]; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function getType() : string { |
@@ -24,15 +24,15 @@ |
||
24 | 24 | * @param array<Arg|VariadicPlaceholder> $args Arguments |
25 | 25 | * @param array $attributes Additional attributes |
26 | 26 | */ |
27 | - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { |
|
27 | + public function __construct( Expr $var, $name, array $args = [ ], array $attributes = [ ] ) { |
|
28 | 28 | $this->attributes = $attributes; |
29 | 29 | $this->var = $var; |
30 | - $this->name = \is_string($name) ? new Identifier($name) : $name; |
|
30 | + $this->name = \is_string( $name ) ? new Identifier( $name ) : $name; |
|
31 | 31 | $this->args = $args; |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getSubNodeNames() : array { |
35 | - return ['var', 'name', 'args']; |
|
35 | + return [ 'var', 'name', 'args' ]; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getType() : string { |
@@ -16,13 +16,13 @@ |
||
16 | 16 | * @param Name $name Constant name |
17 | 17 | * @param array $attributes Additional attributes |
18 | 18 | */ |
19 | - public function __construct(Name $name, array $attributes = []) { |
|
19 | + public function __construct( Name $name, array $attributes = [ ] ) { |
|
20 | 20 | $this->attributes = $attributes; |
21 | 21 | $this->name = $name; |
22 | 22 | } |
23 | 23 | |
24 | 24 | public function getSubNodeNames() : array { |
25 | - return ['name']; |
|
25 | + return [ 'name' ]; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function getType() : string { |
@@ -15,12 +15,12 @@ |
||
15 | 15 | * @param Expr $expr Expression |
16 | 16 | * @param array $attributes Additional attributes |
17 | 17 | */ |
18 | - public function __construct(Expr $expr, array $attributes = []) { |
|
18 | + public function __construct( Expr $expr, array $attributes = [ ] ) { |
|
19 | 19 | $this->attributes = $attributes; |
20 | 20 | $this->expr = $expr; |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getSubNodeNames() : array { |
24 | - return ['expr']; |
|
24 | + return [ 'expr' ]; |
|
25 | 25 | } |
26 | 26 | } |
@@ -15,13 +15,13 @@ |
||
15 | 15 | * @param array $parts Encapsed string array |
16 | 16 | * @param array $attributes Additional attributes |
17 | 17 | */ |
18 | - public function __construct(array $parts, array $attributes = []) { |
|
18 | + public function __construct( array $parts, array $attributes = [ ] ) { |
|
19 | 19 | $this->attributes = $attributes; |
20 | 20 | $this->parts = $parts; |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getSubNodeNames() : array { |
24 | - return ['parts']; |
|
24 | + return [ 'parts' ]; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getType() : string { |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | class Array_ extends Expr |
8 | 8 | { |
9 | 9 | // For use in "kind" attribute |
10 | - const KIND_LONG = 1; // array() syntax |
|
10 | + const KIND_LONG = 1; // array() syntax |
|
11 | 11 | const KIND_SHORT = 2; // [] syntax |
12 | 12 | |
13 | 13 | /** @var (ArrayItem|null)[] Items */ |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | * @param (ArrayItem|null)[] $items Items of the array |
20 | 20 | * @param array $attributes Additional attributes |
21 | 21 | */ |
22 | - public function __construct(array $items = [], array $attributes = []) { |
|
22 | + public function __construct( array $items = [ ], array $attributes = [ ] ) { |
|
23 | 23 | $this->attributes = $attributes; |
24 | 24 | $this->items = $items; |
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getSubNodeNames() : array { |
28 | - return ['items']; |
|
28 | + return [ 'items' ]; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function getType() : string { |