Skip to content

Commit 2a57af8

Browse files
sverasivaschenko
andauthored
Update Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php
Co-authored-by: Sergii Ivashchenko <serg.ivashchenko@gmail.com>
1 parent 95c56c9 commit 2a57af8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,9 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
141141
/x';
142142
$varTagParts = preg_split($re, $tokens[$string]['content']);
143143

144-
foreach ($varTagParts as $part) {
145-
if (stripos($tokens[$isShortDescriptionPreviousVar]['content'], $part) === false) {
144+
if (stripos($tokens[$isShortDescriptionPreviousVar]['content'], implode(' ', $varTagParts)) === false) {
146145
return;
147146
}
148-
}
149147
$error = 'Short description duplicates class property name.';
150148
$phpcsFile->addWarning($error, $isShortDescriptionPreviousVar, 'AlreadyHaveMeaningfulNameVar');
151149
}

0 commit comments

Comments
 (0)