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 1111
1212use PHP_CodeSniffer \Files \File ;
1313use PHP_CodeSniffer \Sniffs \AbstractVariableSniff ;
14+ use PHP_CodeSniffer \Util \Tokens ;
1415
1516/**
1617 * Parses and verifies class property doc comments.
@@ -38,7 +39,7 @@ class VariableCommentSniff extends AbstractVariableSniff
3839 public function processMemberVar (File $ phpcsFile , $ stackPtr )
3940 {
4041 $ tokens = $ phpcsFile ->getTokens ();
41- $ ignore = [
42+ $ ignore = ( [
4243 T_PUBLIC => T_PUBLIC ,
4344 T_PRIVATE => T_PRIVATE ,
4445 T_PROTECTED => T_PROTECTED ,
@@ -57,7 +58,7 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
5758 T_FALSE => T_FALSE ,
5859 T_SELF => T_SELF ,
5960 T_PARENT => T_PARENT ,
60- ];
61+ ] + Tokens:: $ phpcsCommentTokens ) ;
6162
6263 for ($ commentEnd = ($ stackPtr - 1 ); $ commentEnd >= 0 ; $ commentEnd --) {
6364 if (isset ($ ignore [$ tokens [$ commentEnd ]['code ' ]]) === true ) {
Original file line number Diff line number Diff line change @@ -96,4 +96,10 @@ class Test {
9696 */
9797 protected UserStorageInterface &MockObject $ userStorageMock2 ;
9898
99+ /**
100+ * The search score.
101+ */
102+ // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
103+ public string $ search_score ;
104+
99105}
Original file line number Diff line number Diff line change @@ -100,4 +100,10 @@ class Test {
100100 */
101101 protected UserStorageInterface&MockObject $userStorageMock2;
102102
103+ /**
104+ * The search score.
105+ */
106+ // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
107+ public string $search_score;
108+
103109}
You can’t perform that action at this time.
0 commit comments