File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
use PHP_CodeSniffer \Files \File ;
13
13
use PHP_CodeSniffer \Sniffs \AbstractVariableSniff ;
14
+ use PHP_CodeSniffer \Util \Tokens ;
14
15
15
16
/**
16
17
* Parses and verifies class property doc comments.
@@ -38,7 +39,7 @@ class VariableCommentSniff extends AbstractVariableSniff
38
39
public function processMemberVar (File $ phpcsFile , $ stackPtr )
39
40
{
40
41
$ tokens = $ phpcsFile ->getTokens ();
41
- $ ignore = [
42
+ $ ignore = ( [
42
43
T_PUBLIC => T_PUBLIC ,
43
44
T_PRIVATE => T_PRIVATE ,
44
45
T_PROTECTED => T_PROTECTED ,
@@ -57,7 +58,7 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
57
58
T_FALSE => T_FALSE ,
58
59
T_SELF => T_SELF ,
59
60
T_PARENT => T_PARENT ,
60
- ];
61
+ ] + Tokens:: $ phpcsCommentTokens ) ;
61
62
62
63
for ($ commentEnd = ($ stackPtr - 1 ); $ commentEnd >= 0 ; $ commentEnd --) {
63
64
if (isset ($ ignore [$ tokens [$ commentEnd ]['code ' ]]) === true ) {
Original file line number Diff line number Diff line change @@ -96,4 +96,10 @@ class Test {
96
96
*/
97
97
protected UserStorageInterface &MockObject $ userStorageMock2 ;
98
98
99
+ /**
100
+ * The search score.
101
+ */
102
+ // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
103
+ public string $ search_score ;
104
+
99
105
}
Original file line number Diff line number Diff line change @@ -100,4 +100,10 @@ class Test {
100
100
*/
101
101
protected UserStorageInterface&MockObject $userStorageMock2;
102
102
103
+ /**
104
+ * The search score.
105
+ */
106
+ // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
107
+ public string $search_score;
108
+
103
109
}
You can’t perform that action at this time.
0 commit comments