diff --git a/src/CommandLine/CommandLine.php b/src/CommandLine/CommandLine.php index 7a17a67..26582c8 100644 --- a/src/CommandLine/CommandLine.php +++ b/src/CommandLine/CommandLine.php @@ -473,7 +473,8 @@ class CommandLine { } } catch (ReflectionException $e) { - $type = /** @lang text */''; + $type = /** @lang text */ + ''; } throw new InvalidArgumentException('L\'argument n\'est pas d\'un type géré : ' . $type); @@ -723,22 +724,26 @@ class CommandLine { STR_PAD_RIGHT ); - $entries[] = self::TAB . implode(self::TAB, array( - $label, - $occur, - $valueDescription, - preg_replace( - /** @lang RegExp */ '@\r?\n@', - '$0' . self::TAB . implode(self::TAB, array( - str_pad('', $pads->name, ' '), - str_pad('', $pads->occurMin + 4 + $pads->occurMax, ' '), - str_pad('', $pads->valueDescription, ' '), - '', - ) - ), - $value->getDescription() - ), - ) + $entries[] = self::TAB . implode( + self::TAB, + array( + $label, + $occur, + $valueDescription, + preg_replace( + '@\r?\n@', + '$0' . self::TAB . implode( + self::TAB, + array( + str_pad('', $pads->name, ' '), + str_pad('', $pads->occurMin + 4 + $pads->occurMax, ' '), + str_pad('', $pads->valueDescription, ' '), + '', + ) + ), + $value->getDescription() + ), + ) ); } @@ -798,20 +803,24 @@ class CommandLine { STR_PAD_RIGHT ); - $entries[] = self::TAB . self::TAB . implode(self::TAB, array( - $label, - $valueDescription, - preg_replace( - /** @lang RegExp */ '@\r?\n@', - '$0' . self::TAB . self::TAB . implode(self::TAB, array( - str_pad('', $pads->tagShort + 1 + $pads->tagLong + 2, ' '), - str_pad('', $pads->valueDescription, ' '), - '', - ) - ), - $option->getDescription() - ), - ) + $entries[] = self::TAB . implode( + self::TAB, + array( + $label, + $valueDescription, + preg_replace( + '@\r?\n@', + '$0' . self::TAB . self::TAB . implode( + self::TAB, + array( + str_pad('', $pads->tagShort + 1 + $pads->tagLong + 2, ' '), + str_pad('', $pads->valueDescription, ' '), + '', + ) + ), + $option->getDescription() + ), + ) ); } @@ -854,8 +863,9 @@ class CommandLine { return $out; } - if(($arg = OptionAbstract::containsOption($argv)) !== false) + if (($arg = OptionAbstract::containsOption($argv)) !== false) { throw new IncorrectParse('Option inconnue : ' . $arg); + } $values = array_values($this->getValues()); /** @@ -881,7 +891,7 @@ class CommandLine { } if (count($argv)) { - throw new TooMuchValues('Trop de paramètres : '.count($argv).' / '.$nb_args); + throw new TooMuchValues('Trop de paramètres : ' . count($argv) . ' / ' . $nb_args); } // Valeurs par défaut