mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-26 20:04:48 +01:00
parent
80ead71da2
commit
49d73e829f
@ -39,6 +39,8 @@ class PrintableNewAnonClassNode extends Expr
|
||||
public static function fromNewNode(Expr\New_ $newNode) {
|
||||
$class = $newNode->class;
|
||||
assert($class instanceof Node\Stmt\Class_);
|
||||
// We don't assert that $class->name is null here, to allow consumers to assign unique names
|
||||
// to anonymous classes for their own purposes. We simplify ignore the name here.
|
||||
assert($class->name === null);
|
||||
return new self(
|
||||
$newNode->args, $class->extends, $class->implements,
|
||||
|
Loading…
Reference in New Issue
Block a user