← All changes
|
vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php
+6
-3
3.1
→
3.5.10
View file →
| @@ -18,8 +18,10 @@ | ||
| 18 | 18 | class PrintableNewAnonClassNode extends Expr |
| 19 | 19 | { |
| 20 | 20 | /** @var Node\AttributeGroup[] PHP attribute groups */ |
| 21 | 21 | public $attrGroups; |
| 22 | + /** @var int Modifiers */ | |
| 23 | + public $flags; | |
| 22 | 24 | /** @var Node\Arg[] Arguments */ |
| 23 | 25 | public $args; |
| 24 | 26 | /** @var null|Node\Name Name of extended class */ |
| 25 | 27 | public $extends; |
| @@ -28,13 +30,14 @@ | ||
| 28 | 30 | /** @var Node\Stmt[] Statements */ |
| 29 | 31 | public $stmts; |
| 30 | 32 | |
| 31 | 33 | public function __construct( |
| 32 | - array $attrGroups, array $args, Node\Name $extends = null, array $implements, | |
| 34 | + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, | |
| 33 | 35 | array $stmts, array $attributes |
| 34 | 36 | ) { |
| 35 | 37 | parent::__construct($attributes); |
| 36 | 38 | $this->attrGroups = $attrGroups; |
| 39 | + $this->flags = $flags; | |
| 37 | 40 | $this->args = $args; |
| 38 | 41 | $this->extends = $extends; |
| 39 | 42 | $this->implements = $implements; |
| 40 | 43 | $this->stmts = $stmts; |
| @@ -45,9 +48,9 @@ | ||
| 45 | 48 | assert($class instanceof Node\Stmt\Class_); |
| 46 | 49 | // We don't assert that $class->name is null here, to allow consumers to assign unique names |
| 47 | 50 | // to anonymous classes for their own purposes. We simplify ignore the name here. |
| 48 | 51 | return new self( |
| 49 | - $class->attrGroups, $newNode->args, $class->extends, $class->implements, | |
| 52 | + $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, | |
| 50 | 53 | $class->stmts, $newNode->getAttributes() |
| 51 | 54 | ); |
| 52 | 55 | } |
| 53 | 56 | |
| @@ -55,7 +58,7 @@ | ||
| 55 | 58 | return 'Expr_PrintableNewAnonClass'; |
| 56 | 59 | } |
| 57 | 60 | |
| 58 | 61 | public function getSubNodeNames() : array { |
| 59 | - return ['attrGroups', 'args', 'extends', 'implements', 'stmts']; | |
| 62 | + return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; | |
| 60 | 63 | } |
| 61 | 64 | } |