@@ -137,6 +137,9 @@ discard block |
||
137 | 137 | return filemtime($path) != $cache['mtime']; |
138 | 138 | } |
139 | 139 | |
140 | + /** |
|
141 | + * @param string $methodName |
|
142 | + */ |
|
140 | 143 | protected function constructFromClassAndMethod($classNameOrInstance, $methodName) |
141 | 144 | { |
142 | 145 | $this->otherAnnotations = new AnnotationData(); |
@@ -400,7 +403,7 @@ discard block |
||
400 | 403 | /** |
401 | 404 | * Return the list of refleaction parameters. |
402 | 405 | * |
403 | - * @return ReflectionParameter[] |
|
406 | + * @return \ReflectionParameter[] |
|
404 | 407 | */ |
405 | 408 | public function getParameters() |
406 | 409 | { |
@@ -540,7 +543,7 @@ discard block |
||
540 | 543 | * Examine the parameters of the method for this command, and |
541 | 544 | * build a list of commandline arguements for them. |
542 | 545 | * |
543 | - * @return array |
|
546 | + * @return DefaultsWithDescriptions |
|
544 | 547 | */ |
545 | 548 | protected function determineAgumentClassifications() |
546 | 549 | { |
@@ -560,6 +563,7 @@ discard block |
||
560 | 563 | * Examine the provided parameter, and determine whether it |
561 | 564 | * is a parameter that will be filled in with a positional |
562 | 565 | * commandline argument. |
566 | + * @param DefaultsWithDescriptions $result |
|
563 | 567 | */ |
564 | 568 | protected function addParameterToResult($result, $param) |
565 | 569 | { |
@@ -650,6 +654,8 @@ discard block |
||
650 | 654 | /** |
651 | 655 | * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c', |
652 | 656 | * convert the data into the last of these forms. |
657 | + * @param string $text |
|
658 | + * @return string |
|
653 | 659 | */ |
654 | 660 | protected static function convertListToCommaSeparated($text) |
655 | 661 | { |
@@ -72,6 +72,9 @@ |
||
72 | 72 | $options->setWidth($width); |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @return CommandData |
|
77 | + */ |
|
75 | 78 | protected function getTerminalWidth() |
76 | 79 | { |
77 | 80 | // Don't wrap if wrapping has been disabled. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * Check if the provided string begins with a tag |
31 | 31 | * @param string $subject |
32 | - * @return bool |
|
32 | + * @return integer |
|
33 | 33 | */ |
34 | 34 | public static function isTag($subject) |
35 | 35 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @param string $subject |
43 | 43 | * @param string[] &$matches Sets $matches['tag'] and $matches['description'] |
44 | - * @return bool |
|
44 | + * @return integer |
|
45 | 45 | */ |
46 | 46 | public static function splitTagAndContent($subject, &$matches) |
47 | 47 | { |
@@ -101,7 +101,6 @@ discard block |
||
101 | 101 | * - "@tag $variable description" |
102 | 102 | * - "@tag type $variable description" |
103 | 103 | * |
104 | - * @param string $subject |
|
105 | 104 | * @param string[] &$matches Sets $matches['variable'] and |
106 | 105 | * $matches['description']; might set $matches['type']. |
107 | 106 | * @return bool |
@@ -115,10 +114,9 @@ discard block |
||
115 | 114 | |
116 | 115 | /** |
117 | 116 | * Determine if tag is "@tag $variable description" |
118 | - * @param string $subject |
|
119 | 117 | * @param string[] &$matches Sets $matches['variable'] and |
120 | 118 | * $matches['description'] |
121 | - * @return bool |
|
119 | + * @return integer |
|
122 | 120 | */ |
123 | 121 | public function hasVariableAndDescription(&$matches) |
124 | 122 | { |
@@ -129,10 +127,9 @@ discard block |
||
129 | 127 | /** |
130 | 128 | * Determine if tag is "@tag type $variable description" |
131 | 129 | * |
132 | - * @param string $subject |
|
133 | 130 | * @param string[] &$matches Sets $matches['variable'], |
134 | 131 | * $matches['description'] and $matches['type']. |
135 | - * @return bool |
|
132 | + * @return integer |
|
136 | 133 | */ |
137 | 134 | public function hasTypeVariableAndDescription(&$matches) |
138 | 135 | { |
@@ -142,10 +139,9 @@ discard block |
||
142 | 139 | |
143 | 140 | /** |
144 | 141 | * Determine if tag is "@tag word description" |
145 | - * @param string $subject |
|
146 | 142 | * @param string[] &$matches Sets $matches['word'] and |
147 | 143 | * $matches['description'] |
148 | - * @return bool |
|
144 | + * @return integer |
|
149 | 145 | */ |
150 | 146 | public function hasWordAndDescription(&$matches) |
151 | 147 | { |
@@ -21,6 +21,9 @@ |
||
21 | 21 | $this->tags = []; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $line |
|
26 | + */ |
|
24 | 27 | public function parseLine($line) |
25 | 28 | { |
26 | 29 | if (DocblockTag::isTag($line)) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Add a hook |
70 | 70 | * |
71 | - * @param mixed $callback The callback function to call |
|
71 | + * @param callable $callback The callback function to call |
|
72 | 72 | * @param string $hook The name of the hook to add |
73 | 73 | * @param string $name The name of the command to hook |
74 | 74 | * ('*' for all) |
@@ -82,12 +82,18 @@ discard block |
||
82 | 82 | return $this; |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param \Consolidation\AnnotatedCommand\Parser\CommandInfo $commandInfo |
|
87 | + */ |
|
85 | 88 | public function recordHookOptions($commandInfo, $name) |
86 | 89 | { |
87 | 90 | $this->hookOptions[$name][] = $commandInfo; |
88 | 91 | return $this; |
89 | 92 | } |
90 | 93 | |
94 | + /** |
|
95 | + * @param \Consolidation\AnnotatedCommand\AnnotatedCommand $command |
|
96 | + */ |
|
91 | 97 | public static function getNames($command, $callback) |
92 | 98 | { |
93 | 99 | return array_filter( |
@@ -324,6 +330,9 @@ discard block |
||
324 | 330 | return $this; |
325 | 331 | } |
326 | 332 | |
333 | + /** |
|
334 | + * @param Command $command |
|
335 | + */ |
|
327 | 336 | public function getHookOptionsForCommand($command) |
328 | 337 | { |
329 | 338 | $names = $this->addWildcardHooksToNames($command->getNames(), $command->getAnnotationData()); |
@@ -64,6 +64,9 @@ |
||
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param Command $command |
|
69 | + */ |
|
67 | 70 | public function findAndAddHookOptions($command) |
68 | 71 | { |
69 | 72 | if (!$command instanceof AnnotatedCommand) { |
@@ -39,6 +39,9 @@ |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param callable $determiner |
|
44 | + */ |
|
42 | 45 | protected function callDeterminer($determiner, $result) |
43 | 46 | { |
44 | 47 | if ($determiner instanceof StatusDeterminerInterface) { |
@@ -210,6 +210,9 @@ |
||
210 | 210 | return !empty($path) && ($path != '-'); |
211 | 211 | } |
212 | 212 | |
213 | + /** |
|
214 | + * @param string $optionOrArg |
|
215 | + */ |
|
213 | 216 | protected function getOptionOrArg(InputInterface $input, $optionOrArg) |
214 | 217 | { |
215 | 218 | if ($input->hasOption($optionOrArg)) { |
@@ -13,11 +13,17 @@ |
||
13 | 13 | $this->register('Symfony\Component\Console\Output\OutputInterface', $this); |
14 | 14 | } |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $interfaceName |
|
18 | + */ |
|
16 | 19 | public function register($interfaceName, ParameterInjector $injector) |
17 | 20 | { |
18 | 21 | $this->injectors[$interfaceName] = $injector; |
19 | 22 | } |
20 | 23 | |
24 | + /** |
|
25 | + * @param CommandData $commandData |
|
26 | + */ |
|
21 | 27 | public function args($commandData) |
22 | 28 | { |
23 | 29 | return array_merge( |