Skip to content

Commit 25318a9

Browse files
committed
PHP 8.1: Squiz/BlockComment - Enums should be ignored
1 parent ed1e5a8 commit 25318a9

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function process(File $phpcsFile, $stackPtr)
8484
T_CLASS => true,
8585
T_INTERFACE => true,
8686
T_TRAIT => true,
87+
T_ENUM => true,
8788
T_FUNCTION => true,
8889
T_PUBLIC => true,
8990
T_PRIVATE => true,

src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,11 @@ abstract class MyClass
299299
*/
300300
readonly public string $prop;
301301
}
302+
303+
/**
304+
* Comment should be ignored
305+
*
306+
*/
307+
enum MyEnum {
308+
309+
}

src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc.fixed

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,11 @@ abstract class MyClass
301301
*/
302302
readonly public string $prop;
303303
}
304+
305+
/**
306+
* Comment should be ignored
307+
*
308+
*/
309+
enum MyEnum {
310+
311+
}

0 commit comments

Comments
 (0)