Skip to content

Commit

Permalink
Universal/DisallowShortListSyntax: minor simplification
Browse files Browse the repository at this point in the history
PHPCSUtils 1.0.0-rc1 introduces the `Collections::listOpenTokensBC()` token collection which can replace the custom code.
  • Loading branch information
jrfnl committed Dec 29, 2022
1 parent b00e49f commit f714293
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ final class DisallowShortListSyntaxSniff implements Sniff
*/
public function register()
{
$targets = Collections::shortArrayListOpenTokensBC();
$targets[\T_LIST] = \T_LIST; // Only for recording metrics.

return $targets;
return Collections::listOpenTokensBC();
}

/**
Expand Down

0 comments on commit f714293

Please sign in to comment.