Skip to content

Commit 2e6774e

Browse files
committed
[Code] Go wild and add an explanation why we want to keep the @phpstan-ignore-next-line in these cases
1 parent 9262974 commit 2e6774e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Rules/Deprecations/SymfonyCmfRouteObjectInterfaceConstantsRule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public function processNode(Node $node, Scope $scope): array
5050
}
5151

5252
// The next line is intentionally not using [at]phpstan-ignore [identifier].
53+
// The identifier would be 'class.notFound', which would not be true in
54+
// case of a D9 scan and thus would fail the 'phpstan analyze' phase.
5355
// @phpstan-ignore-next-line
5456
$cmfRouteObjectInterfaceType = new ObjectType(SymfonyRouteObjectInterface::class);
5557
if (!$classType->isSuperTypeOf($cmfRouteObjectInterfaceType)->yes()) {

src/Rules/Deprecations/SymfonyCmfRoutingInClassMethodSignatureRule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function processNode(Node $node, Scope $scope): array
4040
$method = $node->getMethodReflection();
4141

4242
// The next lines are intentionally not using [at]phpstan-ignore [identifier].
43+
// The identifier would be 'class.notFound', which would not be true in
44+
// case of a D9 scan and thus would fail the 'phpstan analyze' phase.
4345
// @phpstan-ignore-next-line
4446
$cmfRouteObjectInterfaceType = new ObjectType(RouteObjectInterface::class);
4547
// @phpstan-ignore-next-line

0 commit comments

Comments
 (0)