@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * store that does not itself depend on the annotated-command library. |
221 | 221 | * |
222 | 222 | * @param Mixed $dataStore |
223 | - * @return type |
|
223 | + * @return AnnotatedCommandFactory |
|
224 | 224 | */ |
225 | 225 | public function setDataStore($dataStore) |
226 | 226 | { |
@@ -301,6 +301,10 @@ discard block |
||
301 | 301 | return array_filter($commandInfoList, $commandSelector); |
302 | 302 | } |
303 | 303 | |
304 | + /** |
|
305 | + * @param CommandInfo $commandInfo |
|
306 | + * @param boolean $includeAllPublicMethods |
|
307 | + */ |
|
304 | 308 | public static function isCommandOrHookMethod($commandInfo, $includeAllPublicMethods) |
305 | 309 | { |
306 | 310 | return static::isHookMethod($commandInfo) || static::isCommandMethod($commandInfo, $includeAllPublicMethods); |
@@ -381,6 +385,10 @@ discard block |
||
381 | 385 | } |
382 | 386 | } |
383 | 387 | |
388 | + /** |
|
389 | + * @param string $string |
|
390 | + * @param integer $n |
|
391 | + */ |
|
384 | 392 | protected function getNthWord($string, $n, $default = '', $delimiter = ' ') |
385 | 393 | { |
386 | 394 | $words = explode($delimiter, $string); |
@@ -10,9 +10,6 @@ |
||
10 | 10 | use Consolidation\AnnotatedCommand\Parser\CommandInfoDeserializer; |
11 | 11 | use Consolidation\AnnotatedCommand\Parser\CommandInfoSerializer; |
12 | 12 | use Consolidation\OutputFormatters\Options\FormatterOptions; |
13 | -use Symfony\Component\Console\Command\Command; |
|
14 | -use Symfony\Component\Console\Input\InputInterface; |
|
15 | -use Symfony\Component\Console\Output\OutputInterface; |
|
16 | 13 | |
17 | 14 | /** |
18 | 15 | * The AnnotatedCommandFactory creates commands for your application. |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | // can never be commands. |
248 | 248 | $commandMethodNames = array_filter( |
249 | 249 | get_class_methods($classNameOrInstance) ?: [], |
250 | - function ($m) { |
|
250 | + function($m) { |
|
251 | 251 | return !preg_match('#^_#', $m); |
252 | 252 | } |
253 | 253 | ); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | if (!static::isCommandOrHookMethod($commandInfo, $this->getIncludeAllPublicMethods())) { |
259 | 259 | $commandInfo->invalidate(); |
260 | 260 | } |
261 | - $commandInfoList[$commandMethodName] = $commandInfo; |
|
261 | + $commandInfoList[$commandMethodName] = $commandInfo; |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | return $this->createSelectedCommandsFromClassInfo( |
280 | 280 | $commandInfoList, |
281 | 281 | $commandFileInstance, |
282 | - function ($commandInfo) use ($includeAllPublicMethods) { |
|
282 | + function($commandInfo) use ($includeAllPublicMethods) { |
|
283 | 283 | return static::isCommandMethod($commandInfo, $includeAllPublicMethods); |
284 | 284 | } |
285 | 285 | ); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | { |
290 | 290 | $commandInfoList = $this->filterCommandInfoList($commandInfoList, $commandSelector); |
291 | 291 | return array_map( |
292 | - function ($commandInfo) use ($commandFileInstance) { |
|
292 | + function($commandInfo) use ($commandFileInstance) { |
|
293 | 293 | return $this->createCommand($commandInfo, $commandFileInstance); |
294 | 294 | }, |
295 | 295 | $commandInfoList |