@@ -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]); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | |
323 | 323 | /** |
324 | 324 | * @param array $what list of items |
325 | - * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
325 | + * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
326 | 326 | * @throws \yii\base\Exception |
327 | 327 | */ |
328 | 328 | protected function validateWhat(array $what, $limit = []) |
@@ -486,6 +486,10 @@ discard block |
||
486 | 486 | |
487 | 487 | } |
488 | 488 | |
489 | + /** |
|
490 | + * @param string $name |
|
491 | + * @param string $path |
|
492 | + */ |
|
489 | 493 | protected function releaseApplication($name, $path, $version) |
490 | 494 | { |
491 | 495 | $this->stdout("\n"); |
@@ -584,6 +588,9 @@ discard block |
||
584 | 588 | Yii::setAlias('@app', $this->_oldAlias); |
585 | 589 | } |
586 | 590 | |
591 | + /** |
|
592 | + * @param string $name |
|
593 | + */ |
|
587 | 594 | protected function packageApplication($name, $version, $packagePath) |
588 | 595 | { |
589 | 596 | FileHelper::createDirectory($packagePath); |
@@ -741,6 +748,9 @@ discard block |
||
741 | 748 | } |
742 | 749 | |
743 | 750 | |
751 | + /** |
|
752 | + * @param string[] $what |
|
753 | + */ |
|
744 | 754 | protected function closeChangelogs($what, $version) |
745 | 755 | { |
746 | 756 | $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); |
@@ -752,6 +762,9 @@ discard block |
||
752 | 762 | ); |
753 | 763 | } |
754 | 764 | |
765 | + /** |
|
766 | + * @param string[] $what |
|
767 | + */ |
|
755 | 768 | protected function openChangelogs($what, $version) |
756 | 769 | { |
757 | 770 | $headline = "\n$version under development\n"; |
@@ -768,6 +781,9 @@ discard block |
||
768 | 781 | } |
769 | 782 | } |
770 | 783 | |
784 | + /** |
|
785 | + * @param string[] $what |
|
786 | + */ |
|
771 | 787 | protected function resortChangelogs($what, $version) |
772 | 788 | { |
773 | 789 | foreach($this->getChangelogs($what) as $file) { |
@@ -902,6 +918,9 @@ discard block |
||
902 | 918 | $frameworkPath . '/BaseYii.php'); |
903 | 919 | } |
904 | 920 | |
921 | + /** |
|
922 | + * @param string $pattern |
|
923 | + */ |
|
905 | 924 | protected function sed($pattern, $replace, $files) |
906 | 925 | { |
907 | 926 | foreach((array) $files as $file) { |
@@ -934,6 +953,9 @@ discard block |
||
934 | 953 | const MINOR = 'minor'; |
935 | 954 | const PATCH = 'patch'; |
936 | 955 | |
956 | + /** |
|
957 | + * @param string $type |
|
958 | + */ |
|
937 | 959 | protected function getNextVersions(array $versions, $type) |
938 | 960 | { |
939 | 961 | foreach($versions as $k => $v) { |
@@ -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 | /** |
@@ -144,7 +144,7 @@ |
||
144 | 144 | /** |
145 | 145 | * Generates a hash code that can be used for client-side validation. |
146 | 146 | * @param string $code the CAPTCHA code |
147 | - * @return string a hash code generated from the CAPTCHA code |
|
147 | + * @return integer a hash code generated from the CAPTCHA code |
|
148 | 148 | */ |
149 | 149 | public function generateValidationHash($code) |
150 | 150 | { |
@@ -789,7 +789,7 @@ |
||
789 | 789 | * }); |
790 | 790 | * ``` |
791 | 791 | * |
792 | - * @param string|array $url the URL to be redirected to. This can be in one of the following formats: |
|
792 | + * @param string $url the URL to be redirected to. This can be in one of the following formats: |
|
793 | 793 | * |
794 | 794 | * - a string representing a URL (e.g. "http://example.com") |
795 | 795 | * - a string representing a URL alias (e.g. "@example.com") |
@@ -392,7 +392,7 @@ |
||
392 | 392 | * @param boolean|array $eagerLoading whether to eager load the relations specified in `$with`. |
393 | 393 | * When this is a boolean, it applies to all relations specified in `$with`. Use an array |
394 | 394 | * to explicitly list which relations in `$with` need to be eagerly loaded. Defaults to `true`. |
395 | - * @param string|array $joinType the join type of the relations specified in `$with`. |
|
395 | + * @param string $joinType the join type of the relations specified in `$with`. |
|
396 | 396 | * When this is a string, it applies to all relations specified in `$with`. Use an array |
397 | 397 | * in the format of `relationName => joinType` to specify different join types for different relations. |
398 | 398 | * @return $this the query object itself |
@@ -459,8 +459,8 @@ discard block |
||
459 | 459 | * ``` |
460 | 460 | * |
461 | 461 | * @param array $array |
462 | - * @param string|\Closure $from |
|
463 | - * @param string|\Closure $to |
|
462 | + * @param string $from |
|
463 | + * @param string $to |
|
464 | 464 | * @param string|\Closure $group |
465 | 465 | * @return array |
466 | 466 | */ |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | * To sort by multiple keys, provide an array of keys here. |
516 | 516 | * @param integer|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`. |
517 | 517 | * When sorting by multiple keys with different sorting directions, use an array of sorting directions. |
518 | - * @param integer|array $sortFlag the PHP sort flag. Valid values include |
|
518 | + * @param integer $sortFlag the PHP sort flag. Valid values include |
|
519 | 519 | * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`. |
520 | 520 | * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php) |
521 | 521 | * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags. |