Skip to content

Commit

Permalink
Remove pointless TODO message
Browse files Browse the repository at this point in the history
Apparently `getDeclarationName` will never support T_FN.
  • Loading branch information
antonioeatgoat committed May 5, 2023
1 parent f36c466 commit 62544a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Inpsyde/Sniffs/CodeQuality/ReturnTypeDeclarationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ private function maybeErrors(
}

$tokenCode = $file->getTokens()[$position]['code'] ?? '';
// TODO Remove check on T_FN if getDeclarationName() will support T_FN out of the box
$name = $tokenCode !== T_FN ? (string)$file->getDeclarationName($position) : '';

if (
PhpcsHelpers::functionIsMethod($file, $position)
&& (in_array($name, self::METHODS_WHITELIST, true) || strpos($name, '__') === 0)
Expand Down

0 comments on commit 62544a2

Please sign in to comment.