Skip to content

Commit 07886b7

Browse files
authored
Create instanceof of PHPParser Standard (#146)
1 parent 19d882e commit 07886b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Rules/ForbiddenNodeRule.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,18 @@ final class ForbiddenNodeRule implements Rule, DocumentedRuleInterface, Configur
3434
*/
3535
private array $forbiddenNodes = [];
3636

37+
private readonly Standard $standard;
38+
3739
/**
3840
* @param array<class-string<Node>> $forbiddenNodes
3941
*/
4042
public function __construct(
41-
private readonly Standard $standard,
4243
array $forbiddenNodes
4344
) {
4445
Assert::allIsAOf($forbiddenNodes, Node::class);
4546

4647
$this->forbiddenNodes = $forbiddenNodes;
48+
$this->standard = new Standard();
4749
}
4850

4951
public function getNodeType(): string

0 commit comments

Comments
 (0)