Browse Source

Remove redundant code

ADmad 1 year ago
parent
commit
7935bf3a63
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/Console/Command/HelpCommand.php

+ 1 - 4
src/Console/Command/HelpCommand.php

@@ -182,13 +182,10 @@ class HelpCommand extends BaseCommand implements CommandCollectionAwareInterface
     /**
      * @param list<string> $names Names
      * @return string
+     * @psalm-param non-empty-list<string> $names
      */
     protected function getShortestName(array $names): string
     {
-        if (count($names) <= 1) {
-            return (string)array_shift($names);
-        }
-
         usort($names, function ($a, $b) {
             return strlen($a) - strlen($b);
         });