Skip to content

Commit

Permalink
[Code] Go wild and add an explanation why we want to keep the @phpsta…
Browse files Browse the repository at this point in the history
…n-ignore-next-line in these cases
  • Loading branch information
Boegie committed Nov 15, 2024
1 parent 9262974 commit 2e6774e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public function processNode(Node $node, Scope $scope): array
}

// The next line is intentionally not using [at]phpstan-ignore [identifier].
// The identifier would be 'class.notFound', which would not be true in
// case of a D9 scan and thus would fail the 'phpstan analyze' phase.
// @phpstan-ignore-next-line
$cmfRouteObjectInterfaceType = new ObjectType(SymfonyRouteObjectInterface::class);
if (!$classType->isSuperTypeOf($cmfRouteObjectInterfaceType)->yes()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public function processNode(Node $node, Scope $scope): array
$method = $node->getMethodReflection();

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

0 comments on commit 2e6774e

Please sign in to comment.