Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Jul 17, 2018
1 parent f111949 commit 9142b21
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/Linters/UnusedUseClauseLinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@ public function getLintErrorForNode(

return new FixableASTLintError(
$this,
C\count($unused) === 1
? ('`'.C\firstx($unused)[0].'` is not used')
: (
$unused
|> Vec\map($$, $p ==> '`'.$p[0].'`')
|> Str\join($$, ', ')
|> $$.' are not used'
),
$unused
|> Vec\map($$, $p ==> '`'.$p[0].'`')
|> Str\join($$, ', ')
|> $$.((C\count($unused) === 1) ? ' is' : ' are').' not used',
$node,
);
}
Expand Down Expand Up @@ -105,7 +101,6 @@ private function getUnusedClauses(
if ($kind instanceof ConstToken) {
// unsupported
continue;
continue;
}

invariant($kind === null, 'Unhandled kind: %s', \get_class($kind));
Expand Down

0 comments on commit 9142b21

Please sign in to comment.