From f8d12b19e0e8e9e2a81d98d4e9f53e734a7a4dbc Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Fri, 8 Nov 2024 15:53:58 +0100 Subject: [PATCH] TASK: Add identifier to custom PHPStan rules So that they can be explicitly targeted/ignored --- .../Classes/PhpstanRules/ApiOrInternalAnnotationRule.php | 2 +- .../InternalMethodsNotAllowedOutsideContentRepositoryRule.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/ApiOrInternalAnnotationRule.php b/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/ApiOrInternalAnnotationRule.php index 1f76b0e16bd..3821a0f9f2e 100644 --- a/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/ApiOrInternalAnnotationRule.php +++ b/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/ApiOrInternalAnnotationRule.php @@ -54,7 +54,7 @@ public function processNode(Node $node, Scope $scope): array return [ RuleErrorBuilder::message( 'Class needs @api or @internal annotation.' - )->build(), + )->identifier('neos.cr.internal')->build(), ]; } return []; diff --git a/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/InternalMethodsNotAllowedOutsideContentRepositoryRule.php b/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/InternalMethodsNotAllowedOutsideContentRepositoryRule.php index 5dae4e82dfc..7334cfa78db 100644 --- a/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/InternalMethodsNotAllowedOutsideContentRepositoryRule.php +++ b/Neos.ContentRepository.BehavioralTests/Classes/PhpstanRules/InternalMethodsNotAllowedOutsideContentRepositoryRule.php @@ -74,7 +74,7 @@ public function processNode(Node $node, Scope $scope): array $targetClassName, $node->name->toString() ) - )->build(), + )->identifier('neos.cr.internal')->build(), ]; } }