diff --git a/src/command/overload/CommandOverload.php b/src/command/overload/CommandOverload.php index c0064e90b..cd20a8b7a 100644 --- a/src/command/overload/CommandOverload.php +++ b/src/command/overload/CommandOverload.php @@ -130,8 +130,8 @@ final class CommandOverload{ } /** - * @return Parameter[] - * @phpstan-return list + * @return Parameter[]|string[] + * @phpstan-return list|string> */ public function getParameters() : array{ return $this->parameters; } diff --git a/src/command/utils/CommandStringHelper.php b/src/command/utils/CommandStringHelper.php index 8c7194d2c..009f7689d 100644 --- a/src/command/utils/CommandStringHelper.php +++ b/src/command/utils/CommandStringHelper.php @@ -63,17 +63,6 @@ final class CommandStringHelper{ return $args; } - /** - * Splits by the same logic as {@link self::parseQuoteAware()}, but doesn't strip quotes from the parts or remove - * escapes. Useful if you need to join the parts back into a new command string. - * - * @return string[] - */ - public static function splitQuoteAware(string $commandLine) : array{ - preg_match_all('/"((?:\\\\.|[^\\\\"])*)"|(\S+)/u', $commandLine, $matches); - return $matches[0]; - } - public static function parseQuoteAwareSingle(string $commandLine, int &$offset = 0) : ?string{ //quoted or bare string, like the old CommandStringHelper if(preg_match('/\G(?:"((?:\\\\.|[^\\\\"])*)"|(\S+))/u', $commandLine, $matches, offset: $offset) > 0){