Skip to content

Commit 0066452

Browse files
committed
Generic/CamelCapsFunctionName: remove two incorrect code comments
This sniff only listens to `T_FUNCTION`. It does not listen to `T_FN` or `T_CLOSURE`. So the removed code comments are incorrect. The if conditions are still valid to bail early when live coding, but it does not ever apply to closures or arrow functions.
1 parent 9e60f9f commit 0066452

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScop
113113

114114
$methodName = $phpcsFile->getDeclarationName($stackPtr);
115115
if ($methodName === null) {
116-
// Ignore closures.
117116
return;
118117
}
119118

@@ -189,7 +188,6 @@ protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
189188
{
190189
$functionName = $phpcsFile->getDeclarationName($stackPtr);
191190
if ($functionName === null) {
192-
// Ignore closures.
193191
return;
194192
}
195193

0 commit comments

Comments
 (0)