Skip to content

Commit 4bd4113

Browse files
committed
#162: @deprecated without @see tag false positive
- simplified logic
1 parent 5b82e31 commit 4bd4113

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Magento2/Helpers/Commenting/PHPDocFormattingValidator.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,11 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens)
126126
if ($tokens[$deprecatedPtr + 2]['code'] !== T_DOC_COMMENT_STRING) {
127127
$seeTagRequired = true;
128128
}
129-
130129
$seePtr = $this->getTagPosition('@see', $commentStartPtr, $tokens);
131130
if ($seePtr === -1) {
132131
return !$seeTagRequired;
133132
}
134-
if ($tokens[$seePtr + 2]['code'] !== T_DOC_COMMENT_STRING) {
135-
return false;
136-
}
137-
138-
return true;
133+
return $tokens[$seePtr + 2]['code'] === T_DOC_COMMENT_STRING;
139134
}
140135

141136
/**

0 commit comments

Comments
 (0)