Skip to content

Commit 72acd95

Browse files
committed
AttributeNamedArgumentsRule - do not require named arguments for @no-named-arguments
1 parent de0c09b commit 72acd95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/PHPStan/Build/AttributeNamedArgumentsRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public function processNode(Node $node, Scope $scope): array
3939
return [];
4040
}
4141
$constructor = $attributeReflection->getConstructor();
42+
if (!$constructor->acceptsNamedArguments()->yes()) {
43+
return [];
44+
}
45+
4246
$variants = $constructor->getVariants();
4347
if (count($variants) !== 1) {
4448
return [];

0 commit comments

Comments
 (0)