Skip to content

Commit c1cc5e7

Browse files
committed
Fix up deprecations.
1 parent 2e4db7d commit c1cc5e7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

PhpCollective/Sniffs/Commenting/DisallowArrayTypeHintSyntaxSniff.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,13 @@ protected function findGenericIdentifier(
313313
if (!$annotationValue instanceof ParamTagValueNode && !$annotationValue instanceof ReturnTagValueNode) {
314314
return null;
315315
}
316-
317-
$functionPointer = TokenHelper::findNext($phpcsFile, TokenHelper::$functionTokenCodes, $docCommentOpenPointer + 1);
316+
#
317+
$functionTokenCodes = [
318+
T_FUNCTION,
319+
T_CLOSURE,
320+
T_FN,
321+
];
322+
$functionPointer = TokenHelper::findNext($phpcsFile, $functionTokenCodes, $docCommentOpenPointer + 1);
318323

319324
if ($functionPointer === null || $phpcsFile->getTokens()[$functionPointer]['code'] !== T_FUNCTION) {
320325
return null;

0 commit comments

Comments
 (0)