|
2 | 2 |
|
3 | 3 | namespace Parable\Console; |
4 | 4 |
|
5 | | -use Parable\Console\Parameter\Argument; |
6 | | -use Parable\Console\Parameter\Option; |
| 5 | +use Parable\Console\Parameters\ArgumentParameter; |
| 6 | +use Parable\Console\Parameters\OptionParameter; |
7 | 7 |
|
8 | 8 | class Parameter |
9 | 9 | { |
@@ -44,12 +44,12 @@ class Parameter |
44 | 44 | protected $arguments = []; |
45 | 45 |
|
46 | 46 | /** |
47 | | - * @var Option[] |
| 47 | + * @var OptionParameter[] |
48 | 48 | */ |
49 | 49 | protected $commandOptions = []; |
50 | 50 |
|
51 | 51 | /** |
52 | | - * @var Argument[] |
| 52 | + * @var ArgumentParameter[] |
53 | 53 | */ |
54 | 54 | protected $commandArguments = []; |
55 | 55 |
|
@@ -173,12 +173,12 @@ public function getCommandName(): ?string |
173 | 173 | } |
174 | 174 |
|
175 | 175 | /** |
176 | | - * @param Option[] $options |
| 176 | + * @param OptionParameter[] $options |
177 | 177 | */ |
178 | 178 | public function setCommandOptions(array $options): void |
179 | 179 | { |
180 | 180 | foreach ($options as $name => $option) { |
181 | | - if ((!$option instanceof Option)) { |
| 181 | + if ((!$option instanceof OptionParameter)) { |
182 | 182 | throw Exception::fromMessage( |
183 | 183 | "Options must be instances of Parameter\\Option. %s is not.", |
184 | 184 | $name |
@@ -245,13 +245,13 @@ public function getOptions(): array |
245 | 245 | /** |
246 | 246 | * Set the arguments from a command. |
247 | 247 | * |
248 | | - * @param Argument[] $arguments |
| 248 | + * @param ArgumentParameter[] $arguments |
249 | 249 | */ |
250 | 250 | public function setCommandArguments(array $arguments): void |
251 | 251 | { |
252 | 252 | $orderedArguments = []; |
253 | 253 | foreach ($arguments as $index => $argument) { |
254 | | - if (!($argument instanceof Argument)) { |
| 254 | + if (!($argument instanceof ArgumentParameter)) { |
255 | 255 | throw Exception::fromMessage( |
256 | 256 | "Arguments must be instances of Parameter\\Argument. The item at index %d is not.", |
257 | 257 | $index |
|
0 commit comments