Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function register()
{
$targets = Tokens::$contextSensitiveKeywords;
$targets += [
T_ANON_CLASS => T_ANON_CLASS,
T_CLOSURE => T_CLOSURE,
T_EMPTY => T_EMPTY,
T_ENUM_CASE => T_ENUM_CASE,
Expand Down
4 changes: 4 additions & 0 deletions src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@ EnuM ENUM: string
Case HEARTS;
}

new Class {};
new clasS extends stdClass {};
new class {};

__HALT_COMPILER(); // An exception due to phar support.
function
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@ enum ENUM: string
case HEARTS;
}

new class {};
new class extends stdClass {};
new class {};

__HALT_COMPILER(); // An exception due to phar support.
function
2 changes: 2 additions & 0 deletions src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function getErrorList()
39 => 2,
42 => 1,
44 => 1,
47 => 1,
48 => 1,
];

}//end getErrorList()
Expand Down