updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -44,7 +44,7 @@ final class Parser
* @throws RequiredOptionArgumentMissingException
* @throws UnknownOptionException
*/
public function parse(array $argv, string $shortOptions, array $longOptions = null): array
public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array
{
if (empty($argv)) {
return [[], []];
@@ -93,7 +93,7 @@ final class Parser
substr($arg, 2),
$longOptions,
$options,
$argv
$argv,
);
continue;
@@ -103,7 +103,7 @@ final class Parser
substr($arg, 1),
$shortOptions,
$options,
$argv
$argv,
);
}
@@ -19,8 +19,8 @@ final class AmbiguousOptionException extends RuntimeException implements Excepti
parent::__construct(
sprintf(
'Option "%s" is ambiguous',
$option
)
$option,
),
);
}
}
@@ -19,8 +19,8 @@ final class OptionDoesNotAllowArgumentException extends RuntimeException impleme
parent::__construct(
sprintf(
'Option "%s" does not allow an argument',
$option
)
$option,
),
);
}
}
@@ -19,8 +19,8 @@ final class RequiredOptionArgumentMissingException extends RuntimeException impl
parent::__construct(
sprintf(
'Required argument for option "%s" is missing',
$option
)
$option,
),
);
}
}
@@ -19,8 +19,8 @@ final class UnknownOptionException extends RuntimeException implements Exception
parent::__construct(
sprintf(
'Unknown option "%s"',
$option
)
$option,
),
);
}
}