diff --git a/src/Rules/ForbiddenNodeRule.php b/src/Rules/ForbiddenNodeRule.php index 1a0bd5f2..7e946737 100644 --- a/src/Rules/ForbiddenNodeRule.php +++ b/src/Rules/ForbiddenNodeRule.php @@ -34,16 +34,18 @@ final class ForbiddenNodeRule implements Rule, DocumentedRuleInterface, Configur */ private array $forbiddenNodes = []; + private readonly Standard $standard; + /** * @param array> $forbiddenNodes */ public function __construct( - private readonly Standard $standard, array $forbiddenNodes ) { Assert::allIsAOf($forbiddenNodes, Node::class); $this->forbiddenNodes = $forbiddenNodes; + $this->standard = new Standard(); } public function getNodeType(): string