Skip to content

Commit

Permalink
magento#162: @deprecated without @see tag false positive
Browse files Browse the repository at this point in the history
- simplified logic
  • Loading branch information
lenaorobei committed Sep 2, 2020
1 parent 5b82e31 commit 4bd4113
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Magento2/Helpers/Commenting/PHPDocFormattingValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,11 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens)
if ($tokens[$deprecatedPtr + 2]['code'] !== T_DOC_COMMENT_STRING) {
$seeTagRequired = true;
}

$seePtr = $this->getTagPosition('@see', $commentStartPtr, $tokens);
if ($seePtr === -1) {
return !$seeTagRequired;
}
if ($tokens[$seePtr + 2]['code'] !== T_DOC_COMMENT_STRING) {
return false;
}

return true;
return $tokens[$seePtr + 2]['code'] === T_DOC_COMMENT_STRING;
}

/**
Expand Down

0 comments on commit 4bd4113

Please sign in to comment.