Fix attrGroups/attributes confusion in EnumCase builder

Found by staabm in #907.
This commit is contained in:
Nikita Popov 2022-12-14 21:50:11 +01:00
parent 950bf8f1d1
commit 21a3e8cac5
2 changed files with 3 additions and 3 deletions

View File

@ -80,8 +80,8 @@ class EnumCase implements PhpParser\Builder {
return new Stmt\EnumCase(
$this->name,
$this->value,
$this->attributes,
$this->attributeGroups
$this->attributeGroups,
$this->attributes
);
}
}

View File

@ -26,6 +26,7 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
new Stmt\EnumCase(
"TEST",
null,
[],
[
'comments' => [new Comment\Doc('/** Test */')]
]
@ -49,7 +50,6 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
new Stmt\EnumCase(
"ATTR_GROUP",
null,
[],
[$attributeGroup]
),
$node