Skip to content

Commit dc806fa

Browse files
rodrigoprimojrfnl
authored andcommitted
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 8f34883 commit dc806fa

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)