@@ -89,11 +89,24 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
8989 }
9090
9191 // Check if class has already have meaningful description after @var tag
92- $ isShortDescriptionAfterVar = $ phpcsFile ->findNext (T_DOC_COMMENT_STRING , $ foundVar + 4 , $ commentEnd , false ,
92+ $ isShortDescriptionAfterVar = $ phpcsFile ->findNext (
93+ T_DOC_COMMENT_STRING ,
94+ $ foundVar + 4 ,
95+ $ commentEnd ,
96+ false ,
9397 null ,
94- false );
95- if ($ this ->PHPDocFormattingValidator ->providesMeaning ($ isShortDescriptionAfterVar , $ commentStart , $ tokens ) !== true ) {
96- preg_match ('`^((?:\|?(?:array\([^\)]*\)|[ \\\\\[\]]+))*)( .*)?`i ' , $ tokens [($ foundVar + 2 )]['content ' ], $ varParts );
98+ false
99+ );
100+ if ($ this ->PHPDocFormattingValidator ->providesMeaning (
101+ $ isShortDescriptionAfterVar ,
102+ $ commentStart ,
103+ $ tokens
104+ ) !== true ) {
105+ preg_match (
106+ '`^((?:\|?(?:array\([^\)]*\)|[ \\\\\[\]]+))*)( .*)?`i ' ,
107+ $ tokens [($ foundVar + 2 )]['content ' ],
108+ $ varParts
109+ );
97110 if ($ varParts [1 ]) {
98111 return ;
99112 }
@@ -102,11 +115,24 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
102115 return ;
103116 }
104117 // Check if class has already have meaningful description before @var tag
105- $ isShortDescriptionPreviousVar = $ phpcsFile ->findPrevious (T_DOC_COMMENT_STRING , $ foundVar , $ commentStart , false ,
118+ $ isShortDescriptionPreviousVar = $ phpcsFile ->findPrevious (
119+ T_DOC_COMMENT_STRING ,
120+ $ foundVar ,
121+ $ commentStart ,
122+ false ,
106123 null ,
107- false );
108- if ($ this ->PHPDocFormattingValidator ->providesMeaning ($ isShortDescriptionPreviousVar , $ commentStart , $ tokens ) !== true ) {
109- preg_match ('`^((?:\|?(?:array\([^\)]*\)|[ \\\\\[\]]+))*)( .*)?`i ' , $ tokens [($ foundVar + 2 )]['content ' ], $ varParts );
124+ false
125+ );
126+ if ($ this ->PHPDocFormattingValidator ->providesMeaning (
127+ $ isShortDescriptionPreviousVar ,
128+ $ commentStart ,
129+ $ tokens
130+ ) !== true ) {
131+ preg_match (
132+ '`^((?:\|?(?:array\([^\)]*\)|[ \\\\\[\]]+))*)( .*)?`i ' ,
133+ $ tokens [($ foundVar + 2 )]['content ' ],
134+ $ varParts
135+ );
110136 if ($ varParts [1 ]) {
111137 return ;
112138 }
0 commit comments