Skip to content

Commit 99f718d

Browse files
committed
Merge branch 'feature/generic-lowercasekeyword-readonly' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 951f478 + 68b9c0c commit 99f718d

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

src/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function register()
8282
T_PRIVATE,
8383
T_PROTECTED,
8484
T_PUBLIC,
85+
T_READONLY,
8586
T_REQUIRE,
8687
T_REQUIRE_ONCE,
8788
T_RETURN,

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@ $r = Match ($x) {
3535
DEFAULT, => 3,
3636
};
3737

38+
class Reading {
39+
Public READOnly int $var;
40+
}
41+
3842
__HALT_COMPILER(); // An exception due to phar support.
3943
function

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@ $r = match ($x) {
3535
default, => 3,
3636
};
3737

38+
class Reading {
39+
public readonly int $var;
40+
}
41+
3842
__HALT_COMPILER(); // An exception due to phar support.
3943
function

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function getErrorList()
4040
31 => 1,
4141
32 => 1,
4242
35 => 1,
43+
39 => 2,
4344
];
4445

4546
}//end getErrorList()

0 commit comments

Comments
 (0)