Skip to content

Commit 3225f1a

Browse files
staabmondrejmirtes
authored andcommitted
update nikic/php-parser to 4.15.0
1 parent 1a8f070 commit 3225f1a

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"nette/neon": "^3.3.1",
2222
"nette/schema": "^1.2.2",
2323
"nette/utils": "^3.2.5",
24-
"nikic/php-parser": "^4.14.0",
24+
"nikic/php-parser": "^4.15.0",
2525
"ondram/ci-detector": "^3.4.0",
2626
"ondrejmirtes/better-reflection": "5.8.0.1",
2727
"phpstan/php-8-stubs": "0.3.35",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Rules/Classes/EnumSanityRule.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use PHPStan\Rules\RuleErrorBuilder;
99
use PHPStan\ShouldNotHappenException;
1010
use function array_key_exists;
11-
use function in_array;
1211
use function sprintf;
1312

1413
/**
@@ -70,15 +69,6 @@ public function processNode(Node $node, Scope $scope): array
7069
}
7170
}
7271

73-
// serialize/unserialize is not considered a magic method by PhpParser
74-
if (in_array($lowercasedMethodName, ['__serialize', '__unserialize'], true)) {
75-
$errors[] = RuleErrorBuilder::message(sprintf(
76-
'Enum %s contains magic method %s().',
77-
$node->namespacedName->toString(),
78-
$methodNode->name->name,
79-
))->line($methodNode->getLine())->nonIgnorable()->build();
80-
}
81-
8272
if ($lowercasedMethodName === 'cases') {
8373
$errors[] = RuleErrorBuilder::message(sprintf(
8474
'Enum %s cannot redeclare native method %s().',

0 commit comments

Comments
 (0)