Skip to content

Commit 6a32382

Browse files
committed
PHP 8.1: PEAR/ClassDeclaration - Added support for enums
1 parent c9e0144 commit 6a32382

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.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
];
3132

3233
}//end register()

src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,5 @@ if (!class_exists('ClassOpeningBraceTooMuchIndentation')) {
110110
{
111111
}
112112
}
113+
114+
enum IncorrectBracePlacement {}

src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,7 @@ if (!class_exists('ClassOpeningBraceTooMuchIndentation')) {
119119
{
120120
}
121121
}
122+
123+
enum IncorrectBracePlacement
124+
{
125+
}

src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function getErrorList($testFile='')
6161
99 => 1,
6262
104 => 1,
6363
110 => 1,
64+
114 => 1,
6465
];
6566

6667
default:

0 commit comments

Comments
 (0)