Skip to content

Commit

Permalink
Fix: Remove condition that always evaluates to true
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 8, 2025
1 parent 25826c9 commit 28230d5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Classes/FinalRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ private function hasWhitelistedAnnotation(Node\Stmt\Class_ $node): bool

$reformattedComment = $docComment->getReformattedText();

if (!\is_string($reformattedComment)) {
return false;
}

if (\is_int(\preg_match_all('/@(\S+)(?=\s|$)/', $reformattedComment, $matches))) {
foreach ($matches[1] as $annotation) {
foreach (self::$whitelistedAnnotations as $whitelistedAnnotation) {
Expand Down

0 comments on commit 28230d5

Please sign in to comment.