File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -143,16 +143,17 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
143143 return ;
144144 };
145145 $ propertyName = trim ($ tokens [$ propertyNamePosition ]['content ' ], '$ ' );
146+ $ shortDescription = strtolower ($ tokens [$ isShortDescriptionPreviousVar ]['content ' ]);
146147
147- if (strtolower ( $ tokens [ $ isShortDescriptionPreviousVar ][ ' content ' ]) === strtolower ($ propertyName )) {
148+ if ($ shortDescription === strtolower ($ propertyName )) {
148149 $ error = 'Short description duplicates class property name. ' ;
149150 $ phpcsFile ->addWarning ($ error , $ isShortDescriptionPreviousVar , 'AlreadyHaveMeaningfulNameVar ' );
150151 return ;
151152 }
152153
153154 $ propertyNameParts = array_filter (preg_split ('/(?=[A-Z])/ ' , $ propertyName ));
154155
155- if (strtolower ( $ tokens [ $ isShortDescriptionPreviousVar ][ ' content ' ]) === strtolower (implode (' ' , $ propertyNameParts ))) {
156+ if ($ shortDescription === strtolower (implode (' ' , $ propertyNameParts ))) {
156157 $ error = 'Short description duplicates class property name. ' ;
157158 $ phpcsFile ->addWarning ($ error , $ isShortDescriptionPreviousVar , 'AlreadyHaveMeaningfulNameVar ' );
158159 }
You can’t perform that action at this time.
0 commit comments