We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e4db7d commit c1cc5e7Copy full SHA for c1cc5e7
PhpCollective/Sniffs/Commenting/DisallowArrayTypeHintSyntaxSniff.php
@@ -313,8 +313,13 @@ protected function findGenericIdentifier(
313
if (!$annotationValue instanceof ParamTagValueNode && !$annotationValue instanceof ReturnTagValueNode) {
314
return null;
315
}
316
-
317
- $functionPointer = TokenHelper::findNext($phpcsFile, TokenHelper::$functionTokenCodes, $docCommentOpenPointer + 1);
+#
+ $functionTokenCodes = [
318
+ T_FUNCTION,
319
+ T_CLOSURE,
320
+ T_FN,
321
+ ];
322
+ $functionPointer = TokenHelper::findNext($phpcsFile, $functionTokenCodes, $docCommentOpenPointer + 1);
323
324
if ($functionPointer === null || $phpcsFile->getTokens()[$functionPointer]['code'] !== T_FUNCTION) {
325
0 commit comments