Skip to content

Commit 2b7a230

Browse files
committed
Generic/InterfaceNameSuffix: add inline comment
This commit just adds an inline comment documenting why the sniff bails early if there is no interface name. Doing this to follow the same pattern used by other similar sniffs like AbstractClassName https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/8a7ee56347bb4017ffc778a42a532cbb1651a20b/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php#L48
1 parent e84d732 commit 2b7a230

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function process(File $phpcsFile, $stackPtr)
4040
{
4141
$interfaceName = $phpcsFile->getDeclarationName($stackPtr);
4242
if ($interfaceName === null) {
43+
// Live coding or parse error. Bow out.
4344
return;
4445
}
4546

0 commit comments

Comments
 (0)