Skip to content

Commit 6c96e55

Browse files
committed
PHP 8.1: PSR12/ClosingBrace - Added support for enums
1 parent bc00f4c commit 6c96e55

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function register()
2727
T_CLASS,
2828
T_INTERFACE,
2929
T_TRAIT,
30+
T_ENUM,
3031
T_FUNCTION,
3132
];
3233

src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ $instance = new class extends \Foo implements \HandleableInterface {
4545
$app->get('/hello/{name}', function ($name) use ($app) {
4646
return 'Hello ' . $app->escape($name);
4747
});
48+
49+
enum Foo4
50+
{
51+
52+
}//end

src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function getErrorList()
3131
19 => 1,
3232
24 => 1,
3333
31 => 1,
34+
52 => 1,
3435
];
3536

3637
}//end getErrorList()

0 commit comments

Comments
 (0)