@@ -207,6 +207,9 @@ |
||
207 | 207 | self::assertSame($normalized, $tree->normalize($denormalized)); |
208 | 208 | } |
209 | 209 | |
210 | + /** |
|
211 | + * @return NodeInterface |
|
212 | + */ |
|
210 | 213 | private function getNumericKeysTestTree() |
211 | 214 | { |
212 | 215 | $tb = new TreeBuilder(); |
@@ -34,6 +34,9 @@ |
||
34 | 34 | $this->removeDirectory($this->directory); |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $directory |
|
39 | + */ |
|
37 | 40 | protected function removeDirectory($directory) |
38 | 41 | { |
39 | 42 | $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::CHILD_FIRST); |
@@ -216,6 +216,9 @@ |
||
216 | 216 | } |
217 | 217 | } |
218 | 218 | |
219 | + /** |
|
220 | + * @param boolean $internalErrors |
|
221 | + */ |
|
219 | 222 | protected static function getXmlErrors($internalErrors) |
220 | 223 | { |
221 | 224 | $errors = array(); |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | * @param string $namespace An optional namespace name |
644 | 644 | * @param bool $asDom Whether to return a DOM or an XML string |
645 | 645 | * |
646 | - * @return string|\DOMDocument An XML string representing the Application |
|
646 | + * @return string An XML string representing the Application |
|
647 | 647 | * |
648 | 648 | * @deprecated since version 2.3, to be removed in 3.0. |
649 | 649 | */ |
@@ -1102,6 +1102,9 @@ discard block |
||
1102 | 1102 | $this->defaultCommand = $commandName; |
1103 | 1103 | } |
1104 | 1104 | |
1105 | + /** |
|
1106 | + * @param string $string |
|
1107 | + */ |
|
1105 | 1108 | private function stringWidth($string) |
1106 | 1109 | { |
1107 | 1110 | if (!function_exists('mb_strwidth')) { |
@@ -1115,6 +1118,9 @@ discard block |
||
1115 | 1118 | return mb_strwidth($string, $encoding); |
1116 | 1119 | } |
1117 | 1120 | |
1121 | + /** |
|
1122 | + * @param integer $width |
|
1123 | + */ |
|
1118 | 1124 | private function splitStringByWidth($string, $width) |
1119 | 1125 | { |
1120 | 1126 | // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | * @param string $shortcut The shortcut (can be null) |
392 | 392 | * @param int $mode The option mode: One of the InputOption::VALUE_* constants |
393 | 393 | * @param string $description A description text |
394 | - * @param mixed $default The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE) |
|
394 | + * @param string $default The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE) |
|
395 | 395 | * |
396 | 396 | * @return Command The current instance |
397 | 397 | * |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | * |
660 | 660 | * @param bool $asDom Whether to return a DOM or an XML string |
661 | 661 | * |
662 | - * @return string|\DOMDocument An XML string representing the command |
|
662 | + * @return string An XML string representing the command |
|
663 | 663 | * |
664 | 664 | * @deprecated since version 2.3, to be removed in 3.0. |
665 | 665 | */ |
@@ -196,7 +196,7 @@ |
||
196 | 196 | * |
197 | 197 | * @param string $string |
198 | 198 | * |
199 | - * @return OutputFormatterStyle|bool false if string is not format string |
|
199 | + * @return OutputFormatterStyleInterface|null false if string is not format string |
|
200 | 200 | */ |
201 | 201 | private function createStyleFromString($string) |
202 | 202 | { |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * @param string|null $foreground The style foreground color name |
61 | 61 | * @param string|null $background The style background color name |
62 | - * @param array $options The style options |
|
62 | + * @param string[] $options The style options |
|
63 | 63 | * |
64 | 64 | * @api |
65 | 65 | */ |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | * Asks the user to select a value. |
40 | 40 | * |
41 | 41 | * @param OutputInterface $output An Output instance |
42 | - * @param string|array $question The question to ask |
|
43 | - * @param array $choices List of choices to pick from |
|
42 | + * @param string $question The question to ask |
|
43 | + * @param string[] $choices List of choices to pick from |
|
44 | 44 | * @param bool|string $default The default answer if the user enters nothing |
45 | 45 | * @param bool|int $attempts Max number of times to ask before giving up (false by default, which means infinite) |
46 | 46 | * @param string $errorMessage Message which will be shown if invalid value from choice list would be picked |
47 | 47 | * @param bool $multiselect Select more than one value separated by comma |
48 | 48 | * |
49 | - * @return int|string|array The selected value or values (the key of the choices array) |
|
49 | + * @return string The selected value or values (the key of the choices array) |
|
50 | 50 | * |
51 | 51 | * @throws \InvalidArgumentException |
52 | 52 | */ |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * The question will be asked until the user answers by nothing, yes, or no. |
238 | 238 | * |
239 | 239 | * @param OutputInterface $output An Output instance |
240 | - * @param string|array $question The question to ask |
|
240 | + * @param string $question The question to ask |
|
241 | 241 | * @param bool $default The default answer if the user enters nothing |
242 | 242 | * |
243 | 243 | * @return bool true if the user has confirmed, false otherwise |
@@ -334,13 +334,13 @@ discard block |
||
334 | 334 | * otherwise. |
335 | 335 | * |
336 | 336 | * @param OutputInterface $output An Output instance |
337 | - * @param string|array $question The question to ask |
|
337 | + * @param string $question The question to ask |
|
338 | 338 | * @param callable $validator A PHP callback |
339 | 339 | * @param int|false $attempts Max number of times to ask before giving up (false by default, which means infinite) |
340 | 340 | * @param string $default The default answer if none is given by the user |
341 | 341 | * @param array $autocomplete List of values to autocomplete |
342 | 342 | * |
343 | - * @return mixed |
|
343 | + * @return string |
|
344 | 344 | * |
345 | 345 | * @throws \Exception When any of the validators return an error |
346 | 346 | */ |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | /** |
400 | 400 | * Returns the helper's input stream. |
401 | 401 | * |
402 | - * @return string |
|
402 | + * @return resource |
|
403 | 403 | */ |
404 | 404 | public function getInputStream() |
405 | 405 | { |
@@ -105,7 +105,7 @@ |
||
105 | 105 | * @param Process $process The Process |
106 | 106 | * @param callable|null $callback A PHP callable |
107 | 107 | * |
108 | - * @return callable |
|
108 | + * @return \Closure |
|
109 | 109 | */ |
110 | 110 | public function wrapCallback(OutputInterface $output, Process $process, $callback = null) |
111 | 111 | { |