File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,10 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
127127 false
128128 );
129129
130+ if ($ isShortDescriptionPreviousVar === false ) {
131+ return ;
132+ }
133+
130134 if (stripos ($ tokens [$ isShortDescriptionPreviousVar ]['content ' ], $ tokens [$ string ]['content ' ]) !== false ) {
131135 $ error = 'Short description duplicates class property name. ' ;
132136 $ phpcsFile ->addWarning ($ error , $ isShortDescriptionPreviousVar , 'AlreadyHaveMeaningfulNameVar ' );
@@ -139,7 +143,7 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
139143 | (?<=[A-Z]) # Or g2of2; Position is after uppercase,
140144 (?=[A-Z][a-z]) # and before upper-then-lower case.
141145 /x ' ;
142- $ varTagParts = preg_split ($ re , $ tokens [$ string ]['content ' ]);
146+ $ varTagParts = preg_split ($ regularExpression , $ tokens [$ string ]['content ' ]);
143147
144148 if (stripos ($ tokens [$ isShortDescriptionPreviousVar ]['content ' ], implode (' ' , $ varTagParts )) === false ) {
145149 return ;
You can’t perform that action at this time.
0 commit comments