@@ -4,8 +4,6 @@ |
||
| 4 | 4 | use phpDocumentor\Reflection\DocBlock; |
| 5 | 5 | use phpDocumentor\Reflection\DocBlock\Tag\ParamTag; |
| 6 | 6 | use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag; |
| 7 | -use Consolidation\AnnotatedCommand\Parser\CommandInfo; |
|
| 8 | -use Consolidation\AnnotatedCommand\Parser\DefaultsWithDescriptions; |
|
| 9 | 7 | |
| 10 | 8 | /** |
| 11 | 9 | * Given a class and method name, parse the annotations in the |
@@ -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 | */ |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | |
| 4 | 4 | use Consolidation\AnnotatedCommand\Hooks\HookManager; |
| 5 | 5 | use Consolidation\AnnotatedCommand\Parser\CommandInfo; |
| 6 | -use Consolidation\OutputFormatters\FormatterManager; |
|
| 7 | -use Consolidation\OutputFormatters\Options\FormatterOptions; |
|
| 8 | 6 | use Consolidation\AnnotatedCommand\Help\HelpDocumentAlter; |
| 9 | 7 | use Symfony\Component\Console\Command\Command; |
| 10 | 8 | use Symfony\Component\Console\Input\InputArgument; |
@@ -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()); |
@@ -196,6 +205,10 @@ discard block |
||
| 196 | 205 | return $dom; |
| 197 | 206 | } |
| 198 | 207 | |
| 208 | + /** |
|
| 209 | + * @param \DOMDocument $dom |
|
| 210 | + * @param string $tagName |
|
| 211 | + */ |
|
| 199 | 212 | protected function getSingleElementByTagName($dom, $parent, $tagName) |
| 200 | 213 | { |
| 201 | 214 | // There should always be exactly one '<command>' element. |
@@ -273,6 +286,9 @@ discard block |
||
| 273 | 286 | return InputArgument::OPTIONAL; |
| 274 | 287 | } |
| 275 | 288 | |
| 289 | + /** |
|
| 290 | + * @param CommandInfo $commandInfo |
|
| 291 | + */ |
|
| 276 | 292 | public function setCommandOptions($commandInfo, $automaticOptions = []) |
| 277 | 293 | { |
| 278 | 294 | $inputOptions = $commandInfo->inputOptions(); |
@@ -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 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Consolidation\AnnotatedCommand\Parser; |
| 3 | 3 | |
| 4 | 4 | use Symfony\Component\Console\Input\InputOption; |
| 5 | -use Consolidation\AnnotatedCommand\Parser\Internal\CommandDocBlockParser; |
|
| 6 | 5 | use Consolidation\AnnotatedCommand\Parser\Internal\CommandDocBlockParserFactory; |
| 7 | 6 | use Consolidation\AnnotatedCommand\AnnotationData; |
| 8 | 7 | |
@@ -24,6 +24,10 @@ |
||
| 24 | 24 | $command->optionsHookForHookAnnotations($commandInfoList); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param callable $optionHook |
|
| 29 | + * @param Command $command |
|
| 30 | + */ |
|
| 27 | 31 | protected function callOptionHook($optionHook, $command, AnnotationData $annotationData) |
| 28 | 32 | { |
| 29 | 33 | if ($optionHook instanceof OptionHookInterface) { |