Skip to content

Commit

Permalink
Merge pull request #376 from spryker/bugfix/frw-8590/dev-fix-specific…
Browse files Browse the repository at this point in the history
…ation-sniffer-false-negative-error

FRW-8590 Fixed false negative error for specification annotation.
  • Loading branch information
asmarovydlo authored Jun 6, 2024
2 parents 1cb5550 + afef65e commit c984469
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Spryker/Sniffs/Commenting/DocBlockApiAnnotationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,12 @@ public function validateSpecification(File $phpCsFile, int $stackPointer): ?int
return null;
}

$apiTagPosition = $this->findApiAnnotationIndex($phpCsFile, $stackPointer);
$specificationPosition = $this->getContentPositionInRange(
static::SPECIFICATION_TAG,
$tokens,
$docCommentOpenerPosition,
$docCommentClosingPosition,
$apiTagPosition ?? $docCommentClosingPosition,
);
if (!$specificationPosition) {
return null;
Expand Down

0 comments on commit c984469

Please sign in to comment.