|
34 | 34 | final class Parser
|
35 | 35 | {
|
36 | 36 | /**
|
37 |
| - * @psalm-param list<string> $argv |
38 |
| - * @psalm-param list<string> $longOptions |
39 |
| - * |
40 |
| - * @psalm-return array{0: array, 1: array} |
| 37 | + * @param list<string> $argv |
| 38 | + * @param list<string> $longOptions |
41 | 39 | *
|
42 | 40 | * @throws AmbiguousOptionException
|
43 | 41 | * @throws OptionDoesNotAllowArgumentException
|
44 | 42 | * @throws RequiredOptionArgumentMissingException
|
45 | 43 | * @throws UnknownOptionException
|
| 44 | + * |
| 45 | + * @return array{0: list<array{0: non-empty-string, 1: ?non-empty-string}>, 1: list<non-empty-string>} |
46 | 46 | */
|
47 | 47 | public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array
|
48 | 48 | {
|
@@ -111,6 +111,9 @@ public function parse(array $argv, string $shortOptions, ?array $longOptions = n
|
111 | 111 | }
|
112 | 112 |
|
113 | 113 | /**
|
| 114 | + * @param list<array{0: non-empty-string, 1: ?non-empty-string}> $options |
| 115 | + * @param list<string> $argv |
| 116 | + * |
114 | 117 | * @throws RequiredOptionArgumentMissingException
|
115 | 118 | */
|
116 | 119 | private function parseShortOption(string $argument, string $shortOptions, array &$options, array &$argv): void
|
@@ -150,7 +153,9 @@ private function parseShortOption(string $argument, string $shortOptions, array
|
150 | 153 | }
|
151 | 154 |
|
152 | 155 | /**
|
153 |
| - * @psalm-param list<string> $longOptions |
| 156 | + * @param list<string> $longOptions |
| 157 | + * @param list<array{0: non-empty-string, 1: ?non-empty-string}> $options |
| 158 | + * @param list<string> $argv |
154 | 159 | *
|
155 | 160 | * @throws AmbiguousOptionException
|
156 | 161 | * @throws OptionDoesNotAllowArgumentException
|
|
0 commit comments