Skip to content

Commit

Permalink
Update FullyQualifiedClassNameInAnnotationSniff.php
Browse files Browse the repository at this point in the history
  • Loading branch information
gemal committed Aug 4, 2023
1 parent 6d00367 commit a2493c0
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function register(): array
public function process(File $phpcsFile, $docCommentOpenPointer): void
{
$annotations = AnnotationHelper::getAnnotations($phpcsFile, $docCommentOpenPointer);
$ignoredAnnotationNames = SniffSettingsHelper::normalizeArray($this->ignoredAnnotationNames);

foreach ($annotations as $annotation) {
/** @var list<IdentifierTypeNode> $identifierTypeNodes */
Expand All @@ -65,7 +66,7 @@ public function process(File $phpcsFile, $docCommentOpenPointer): void
continue;
}

if (in_array($annotationName, $this->getIgnoredAnnotationNames(), true)) {
if (in_array($annotationName, $ignoredAnnotationNames, true)) {
continue;
}

Expand Down Expand Up @@ -169,14 +170,4 @@ public function process(File $phpcsFile, $docCommentOpenPointer): void
}
}

/**
* @return list<string>
*/
private function getIgnoredAnnotationNames(): array
{
$this->ignoredAnnotationNames = SniffSettingsHelper::normalizeArray($this->ignoredAnnotationNames);

return $this->ignoredAnnotationNames;
}

}

0 comments on commit a2493c0

Please sign in to comment.