@@ -224,7 +224,7 @@ |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
227 | - * @return array the begin and end pages that need to be displayed. |
|
227 | + * @return integer[] the begin and end pages that need to be displayed. |
|
228 | 228 | */ |
229 | 229 | protected function getPageRange() |
230 | 230 | { |
@@ -795,7 +795,7 @@ |
||
795 | 795 | |
796 | 796 | /** |
797 | 797 | * Appends a SQL statement using UNION operator. |
798 | - * @param string|Query $sql the SQL statement to be appended using UNION |
|
798 | + * @param Query $sql the SQL statement to be appended using UNION |
|
799 | 799 | * @param boolean $all TRUE if using UNION ALL and FALSE if using UNION |
800 | 800 | * @return $this the query object itself |
801 | 801 | */ |
@@ -574,7 +574,7 @@ |
||
574 | 574 | * Finds out a line of the first non-char PHP token found |
575 | 575 | * |
576 | 576 | * @param array $tokens |
577 | - * @return integer|string |
|
577 | + * @return string |
|
578 | 578 | * @since 2.0.1 |
579 | 579 | */ |
580 | 580 | protected function getLine($tokens) |
@@ -126,7 +126,7 @@ |
||
126 | 126 | * This method is called by [[evaluateAttributes()]]. Its return value will be assigned |
127 | 127 | * to the attributes corresponding to the triggering event. |
128 | 128 | * @param Event $event the event that triggers the current attribute updating. |
129 | - * @return mixed the attribute value |
|
129 | + * @return string the attribute value |
|
130 | 130 | */ |
131 | 131 | protected function getValue($event) |
132 | 132 | { |
@@ -114,6 +114,9 @@ discard block |
||
114 | 114 | return array_merge(parent::options($actionID), ['updateFiles', 'skipFrameworkRequirements']); |
115 | 115 | } |
116 | 116 | |
117 | + /** |
|
118 | + * @param string|null $root |
|
119 | + */ |
|
117 | 120 | protected function findFiles($root, $needsInclude = true) |
118 | 121 | { |
119 | 122 | $except = []; |
@@ -237,6 +240,9 @@ discard block |
||
237 | 240 | return FileHelper::findFiles($root, $options); |
238 | 241 | } |
239 | 242 | |
243 | + /** |
|
244 | + * @param string $extensionPath |
|
245 | + */ |
|
240 | 246 | private function setUpExtensionAliases($extensionPath) |
241 | 247 | { |
242 | 248 | foreach (scandir($extensionPath) as $extension) { |
@@ -344,6 +350,9 @@ discard block |
||
344 | 350 | } |
345 | 351 | } |
346 | 352 | |
353 | + /** |
|
354 | + * @param string $line |
|
355 | + */ |
|
347 | 356 | protected function fixParamTypes($line) |
348 | 357 | { |
349 | 358 | return preg_replace_callback('~@(param|return) ([\w\\|]+)~i', function($matches) { |
@@ -477,6 +486,10 @@ discard block |
||
477 | 486 | // TODO |
478 | 487 | } |
479 | 488 | |
489 | + /** |
|
490 | + * @param null|string $className |
|
491 | + * @param string $propertyDoc |
|
492 | + */ |
|
480 | 493 | protected function updateClassPropertyDocs($file, $className, $propertyDoc) |
481 | 494 | { |
482 | 495 | $ref = new \ReflectionClass($className); |
@@ -552,7 +565,7 @@ discard block |
||
552 | 565 | /** |
553 | 566 | * remove multi empty lines and trim trailing whitespace |
554 | 567 | * |
555 | - * @param $doc |
|
568 | + * @param string $doc |
|
556 | 569 | * @return string |
557 | 570 | */ |
558 | 571 | protected function cleanDocComment($doc) |
@@ -571,7 +584,7 @@ discard block |
||
571 | 584 | |
572 | 585 | /** |
573 | 586 | * Replace property annotations in doc comment |
574 | - * @param $doc |
|
587 | + * @param string $doc |
|
575 | 588 | * @param $properties |
576 | 589 | * @return string |
577 | 590 | */ |
@@ -739,6 +752,9 @@ discard block |
||
739 | 752 | return [$className, $phpdoc]; |
740 | 753 | } |
741 | 754 | |
755 | + /** |
|
756 | + * @param string $pattern |
|
757 | + */ |
|
742 | 758 | protected function match($pattern, $subject, $split = false) |
743 | 759 | { |
744 | 760 | $sets = []; |
@@ -760,6 +776,9 @@ discard block |
||
760 | 776 | return $sets; |
761 | 777 | } |
762 | 778 | |
779 | + /** |
|
780 | + * @param string $str |
|
781 | + */ |
|
763 | 782 | protected function fixSentence($str) |
764 | 783 | { |
765 | 784 | // TODO fix word wrap |
@@ -768,6 +787,9 @@ discard block |
||
768 | 787 | return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : ''); |
769 | 788 | } |
770 | 789 | |
790 | + /** |
|
791 | + * @param string $param |
|
792 | + */ |
|
771 | 793 | protected function getPropParam($prop, $param) |
772 | 794 | { |
773 | 795 | return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]); |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * |
263 | 263 | * @param string $message to echo out before waiting for user input |
264 | 264 | * @param boolean $default this value is returned if no selection is made. |
265 | - * @return boolean whether user confirmed. |
|
265 | + * @return boolean|null whether user confirmed. |
|
266 | 266 | * Will return true if [[interactive]] is false. |
267 | 267 | */ |
268 | 268 | public function confirm($message, $default = false) |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * until [[beforeAction()]] is being called. |
299 | 299 | * |
300 | 300 | * @param string $actionID the action id of the current request |
301 | - * @return array the names of the options valid for the action |
|
301 | + * @return string[] the names of the options valid for the action |
|
302 | 302 | */ |
303 | 303 | public function options($actionID) |
304 | 304 | { |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | * - windows without ansicon |
577 | 577 | * - not tty consoles |
578 | 578 | * |
579 | - * @param mixed $stream |
|
579 | + * @param resource $stream |
|
580 | 580 | * @return boolean true if the stream supports ANSI colors, otherwise false. |
581 | 581 | */ |
582 | 582 | public static function streamSupportsAnsiColors($stream) |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * @param boolean $refresh whether to force checking and not re-use cached size value. |
602 | 602 | * This is useful to detect changing window size while the application is running but may |
603 | 603 | * not get up to date values on every terminal. |
604 | - * @return array|boolean An array of ($width, $height) or false when it was not able to determine size. |
|
604 | + * @return string An array of ($width, $height) or false when it was not able to determine size. |
|
605 | 605 | */ |
606 | 606 | public static function getScreenSize($refresh = false) |
607 | 607 | { |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | * |
808 | 808 | * @param string $message to print out before waiting for user input |
809 | 809 | * @param boolean $default this value is returned if no selection is made. |
810 | - * @return boolean whether user confirmed |
|
810 | + * @return boolean|null whether user confirmed |
|
811 | 811 | */ |
812 | 812 | public static function confirm($message, $default = false) |
813 | 813 | { |
@@ -9,7 +9,6 @@ |
||
9 | 9 | |
10 | 10 | use Yii; |
11 | 11 | use yii\base\Action; |
12 | -use yii\base\InvalidParamException; |
|
13 | 12 | use yii\base\ViewNotFoundException; |
14 | 13 | |
15 | 14 | /** |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | * @param UrlManager $manager the URL manager |
335 | 335 | * @param string $route the route. It should not have slashes at the beginning or the end. |
336 | 336 | * @param array $params the parameters |
337 | - * @return string|boolean the created URL, or `false` if this rule cannot be used for creating this URL. |
|
337 | + * @return false|string the created URL, or `false` if this rule cannot be used for creating this URL. |
|
338 | 338 | */ |
339 | 339 | public function createUrl($manager, $route, $params) |
340 | 340 | { |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * When found - replaces this placeholder key with a appropriate name of matching parameter. |
426 | 426 | * Used in [[parseRequest()]], [[createUrl()]]. |
427 | 427 | * |
428 | - * @param array $matches result of `preg_match()` call |
|
428 | + * @param string[] $matches result of `preg_match()` call |
|
429 | 429 | * @return array input array with replaced placeholder keys |
430 | 430 | * @see placeholders |
431 | 431 | * @since 2.0.7 |