@@ -89,11 +89,24 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
89
89
}
90
90
91
91
// 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 ,
93
97
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
+ );
97
110
if ($ varParts [1 ]) {
98
111
return ;
99
112
}
@@ -102,11 +115,24 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
102
115
return ;
103
116
}
104
117
// 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 ,
106
123
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
+ );
110
136
if ($ varParts [1 ]) {
111
137
return ;
112
138
}
0 commit comments