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)
127
127
false
128
128
);
129
129
130
+ if ($ isShortDescriptionPreviousVar === false ) {
131
+ return ;
132
+ }
133
+
130
134
if (stripos ($ tokens [$ isShortDescriptionPreviousVar ]['content ' ], $ tokens [$ string ]['content ' ]) !== false ) {
131
135
$ error = 'Short description duplicates class property name. ' ;
132
136
$ phpcsFile ->addWarning ($ error , $ isShortDescriptionPreviousVar , 'AlreadyHaveMeaningfulNameVar ' );
@@ -139,7 +143,7 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
139
143
| (?<=[A-Z]) # Or g2of2; Position is after uppercase,
140
144
(?=[A-Z][a-z]) # and before upper-then-lower case.
141
145
/x ' ;
142
- $ varTagParts = preg_split ($ re , $ tokens [$ string ]['content ' ]);
146
+ $ varTagParts = preg_split ($ regularExpression , $ tokens [$ string ]['content ' ]);
143
147
144
148
if (stripos ($ tokens [$ isShortDescriptionPreviousVar ]['content ' ], implode (' ' , $ varTagParts )) === false ) {
145
149
return ;
You can’t perform that action at this time.
0 commit comments