@@ -255,7 +255,7 @@ |
||
| 255 | 255 | { |
| 256 | 256 | $names = array_merge( |
| 257 | 257 | (array)$names, |
| 258 | - ($annotationData == null) ? [] : array_map(function ($item) { |
|
| 258 | + ($annotationData == null) ? [] : array_map(function($item) { |
|
| 259 | 259 | return "@$item"; |
| 260 | 260 | }, $annotationData->keys()) |
| 261 | 261 | ); |
@@ -207,6 +207,7 @@ discard block |
||
| 207 | 207 | /** |
| 208 | 208 | * Given a docblock description in the form "$variable description", |
| 209 | 209 | * return the variable name and description via the 'match' parameter. |
| 210 | + * @param string $source |
|
| 210 | 211 | */ |
| 211 | 212 | protected function pregMatchNameAndDescription($source, &$match) |
| 212 | 213 | { |
@@ -220,6 +221,7 @@ discard block |
||
| 220 | 221 | /** |
| 221 | 222 | * Given a docblock description in the form "$variable description", |
| 222 | 223 | * return the variable name and description via the 'match' parameter. |
| 224 | + * @param string $source |
|
| 223 | 225 | */ |
| 224 | 226 | protected function pregMatchOptionNameAndDescription($source, &$match) |
| 225 | 227 | { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | /** |
| 38 | 38 | * For internal use only; indicates that the function to be called |
| 39 | 39 | * should be passed an InputInterface &/or an OutputInterface. |
| 40 | - * @param booean $usesInputInterface |
|
| 40 | + * @param boolean $usesInputInterface |
|
| 41 | 41 | * @param boolean $usesOutputInterface |
| 42 | 42 | * @return self |
| 43 | 43 | */ |
@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | protected $usesOutputInterface; |
| 39 | 39 | protected $returnType; |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $name |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct($name = null) |
| 42 | 45 | { |
| 43 | 46 | $commandInfo = false; |
@@ -67,6 +70,9 @@ discard block |
||
| 67 | 70 | return $this; |
| 68 | 71 | } |
| 69 | 72 | |
| 73 | + /** |
|
| 74 | + * @param CommandProcessor $commandProcessor |
|
| 75 | + */ |
|
| 70 | 76 | public function setCommandProcessor($commandProcessor) |
| 71 | 77 | { |
| 72 | 78 | $this->commandProcessor = $commandProcessor; |
@@ -120,6 +126,9 @@ discard block |
||
| 120 | 126 | return $this; |
| 121 | 127 | } |
| 122 | 128 | |
| 129 | + /** |
|
| 130 | + * @param CommandInfo $commandInfo |
|
| 131 | + */ |
|
| 123 | 132 | public function setCommandInfo($commandInfo) |
| 124 | 133 | { |
| 125 | 134 | $this->setDescription($commandInfo->getDescription()); |
@@ -198,6 +207,10 @@ discard block |
||
| 198 | 207 | return $dom; |
| 199 | 208 | } |
| 200 | 209 | |
| 210 | + /** |
|
| 211 | + * @param \DOMDocument $dom |
|
| 212 | + * @param string $tagName |
|
| 213 | + */ |
|
| 201 | 214 | protected function getSingleElementByTagName($dom, $parent, $tagName) |
| 202 | 215 | { |
| 203 | 216 | // There should always be exactly one '<command>' element. |
@@ -275,6 +288,9 @@ discard block |
||
| 275 | 288 | return InputArgument::OPTIONAL; |
| 276 | 289 | } |
| 277 | 290 | |
| 291 | + /** |
|
| 292 | + * @param CommandInfo $commandInfo |
|
| 293 | + */ |
|
| 278 | 294 | public function setCommandOptions($commandInfo, $automaticOptions = []) |
| 279 | 295 | { |
| 280 | 296 | $inputOptions = $commandInfo->inputOptions(); |
@@ -345,6 +361,9 @@ discard block |
||
| 345 | 361 | ); |
| 346 | 362 | } |
| 347 | 363 | |
| 364 | + /** |
|
| 365 | + * @param Hooks\CommandInfo[] $commandInfoList |
|
| 366 | + */ |
|
| 348 | 367 | public function optionsHookForHookAnnotations($commandInfoList) |
| 349 | 368 | { |
| 350 | 369 | foreach ($commandInfoList as $commandInfo) { |
@@ -144,6 +144,9 @@ discard block |
||
| 144 | 144 | return filemtime($path) != $cache['mtime']; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $methodName |
|
| 149 | + */ |
|
| 147 | 150 | protected function constructFromClassAndMethod($classNameOrInstance, $methodName) |
| 148 | 151 | { |
| 149 | 152 | $this->otherAnnotations = new AnnotationData(); |
@@ -462,7 +465,7 @@ discard block |
||
| 462 | 465 | /** |
| 463 | 466 | * Set aliases that can be used in place of the command's primary name. |
| 464 | 467 | * |
| 465 | - * @param string|string[] $aliases |
|
| 468 | + * @param string $aliases |
|
| 466 | 469 | */ |
| 467 | 470 | public function setAliases($aliases) |
| 468 | 471 | { |
@@ -516,7 +519,7 @@ discard block |
||
| 516 | 519 | /** |
| 517 | 520 | * Return the list of refleaction parameters. |
| 518 | 521 | * |
| 519 | - * @return ReflectionParameter[] |
|
| 522 | + * @return \ReflectionParameter[] |
|
| 520 | 523 | */ |
| 521 | 524 | public function getParameters() |
| 522 | 525 | { |
@@ -647,7 +650,7 @@ discard block |
||
| 647 | 650 | * Examine the parameters of the method for this command, and |
| 648 | 651 | * build a list of commandline arguements for them. |
| 649 | 652 | * |
| 650 | - * @return array |
|
| 653 | + * @return DefaultsWithDescriptions |
|
| 651 | 654 | */ |
| 652 | 655 | protected function determineAgumentClassifications() |
| 653 | 656 | { |
@@ -667,6 +670,7 @@ discard block |
||
| 667 | 670 | * Examine the provided parameter, and determine whether it |
| 668 | 671 | * is a parameter that will be filled in with a positional |
| 669 | 672 | * commandline argument. |
| 673 | + * @param DefaultsWithDescriptions $result |
|
| 670 | 674 | */ |
| 671 | 675 | protected function addParameterToResult($result, $param) |
| 672 | 676 | { |
@@ -757,6 +761,8 @@ discard block |
||
| 757 | 761 | /** |
| 758 | 762 | * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c', |
| 759 | 763 | * convert the data into the last of these forms. |
| 764 | + * @param string $text |
|
| 765 | + * @return string |
|
| 760 | 766 | */ |
| 761 | 767 | protected static function convertListToCommaSeparated($text) |
| 762 | 768 | { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | $this->name = $info_array['name']; |
| 173 | 173 | $this->methodName = $info_array['method_name']; |
| 174 | - $this->otherAnnotations = new AnnotationData((array) $info_array['annotations']); |
|
| 174 | + $this->otherAnnotations = new AnnotationData((array)$info_array['annotations']); |
|
| 175 | 175 | $this->arguments = new DefaultsWithDescriptions(); |
| 176 | 176 | $this->options = new DefaultsWithDescriptions(); |
| 177 | 177 | $this->aliases = $info_array['aliases']; |
@@ -716,8 +716,8 @@ discard block |
||
| 716 | 716 | */ |
| 717 | 717 | protected function convertName($camel) |
| 718 | 718 | { |
| 719 | - $splitter="-"; |
|
| 720 | - $camel=preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)); |
|
| 719 | + $splitter = "-"; |
|
| 720 | + $camel = preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)); |
|
| 721 | 721 | $camel = preg_replace("/$splitter/", ':', $camel, 1); |
| 722 | 722 | return strtolower($camel); |
| 723 | 723 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | protected function getSearchDepth() |
| 249 | 249 | { |
| 250 | - return $this->searchDepth <= 0 ? '== 0' : '<= ' . $this->searchDepth; |
|
| 250 | + return $this->searchDepth <= 0 ? '== 0' : '<= '.$this->searchDepth; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | /** |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | return $this->joinParts( |
| 342 | 342 | '\\', |
| 343 | 343 | $namespaceParts, |
| 344 | - function ($item) { |
|
| 344 | + function($item) { |
|
| 345 | 345 | return !is_numeric($item) && !empty($item); |
| 346 | 346 | } |
| 347 | 347 | ); |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | $path = $this->joinParts( |
| 361 | 361 | '/', |
| 362 | 362 | $pathParts, |
| 363 | - function ($item) { |
|
| 363 | + function($item) { |
|
| 364 | 364 | return !empty($item); |
| 365 | 365 | } |
| 366 | 366 | ); |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | protected function joinParts($delimiter, $parts, $filterFunction) |
| 378 | 378 | { |
| 379 | 379 | $parts = array_map( |
| 380 | - function ($item) use ($delimiter) { |
|
| 380 | + function($item) use ($delimiter) { |
|
| 381 | 381 | return rtrim($item, $delimiter); |
| 382 | 382 | }, |
| 383 | 383 | $parts |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function get($key) |
| 36 | 36 | { |
| 37 | - return (array) $this->dataStore->get($key); |
|
| 37 | + return (array)$this->dataStore->get($key); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | // can never be commands. |
| 245 | 245 | $commandMethodNames = array_filter( |
| 246 | 246 | get_class_methods($classNameOrInstance) ?: [], |
| 247 | - function ($m) { |
|
| 247 | + function($m) { |
|
| 248 | 248 | return !preg_match('#^_#', $m); |
| 249 | 249 | } |
| 250 | 250 | ); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | if (!array_key_exists($commandMethodName, $cachedCommandInfoList)) { |
| 254 | 254 | $commandInfo = CommandInfo::create($classNameOrInstance, $commandMethodName); |
| 255 | 255 | if (static::isCommandOrHookMethod($commandInfo, $this->getIncludeAllPublicMethods())) { |
| 256 | - $commandInfoList[$commandMethodName] = $commandInfo; |
|
| 256 | + $commandInfoList[$commandMethodName] = $commandInfo; |
|
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | } |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | return $this->createSelectedCommandsFromClassInfo( |
| 276 | 276 | $commandInfoList, |
| 277 | 277 | $commandFileInstance, |
| 278 | - function ($commandInfo) use ($includeAllPublicMethods) { |
|
| 278 | + function($commandInfo) use ($includeAllPublicMethods) { |
|
| 279 | 279 | return static::isCommandMethod($commandInfo, $includeAllPublicMethods); |
| 280 | 280 | } |
| 281 | 281 | ); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | { |
| 286 | 286 | $commandInfoList = $this->filterCommandInfoList($commandInfoList, $commandSelector); |
| 287 | 287 | return array_map( |
| 288 | - function ($commandInfo) use ($commandFileInstance) { |
|
| 288 | + function($commandInfo) use ($commandFileInstance) { |
|
| 289 | 289 | return $this->createCommand($commandInfo, $commandFileInstance); |
| 290 | 290 | }, |
| 291 | 291 | $commandInfoList |