Skip to content

Commit e95d796

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/AbstractClassNamePrefix: fix up incorrect code comment
This sniff only listens to `T_CLASS`. It does not listen to `T_ANON_CLASS`. So the removed code comment is incorrect. The if condition is still valid to bail early when live coding, but it does not ever apply to anonymous classes.
1 parent 40daeca commit e95d796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function process(File $phpcsFile, $stackPtr)
4545

4646
$className = $phpcsFile->getDeclarationName($stackPtr);
4747
if ($className === null) {
48-
// We are not interested in anonymous classes.
48+
// Live coding or parse error.
4949
return;
5050
}
5151

0 commit comments

Comments
 (0)