@@ -113,6 +113,9 @@ discard block |
||
113 | 113 | return array_merge(parent::options($actionID), ['updateFiles', 'skipFrameworkRequirements']); |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param string|null $root |
|
118 | + */ |
|
116 | 119 | protected function findFiles($root, $needsInclude = true) |
117 | 120 | { |
118 | 121 | $except = []; |
@@ -233,6 +236,9 @@ discard block |
||
233 | 236 | return FileHelper::findFiles($root, $options); |
234 | 237 | } |
235 | 238 | |
239 | + /** |
|
240 | + * @param string $extensionPath |
|
241 | + */ |
|
236 | 242 | private function setUpExtensionAliases($extensionPath) |
237 | 243 | { |
238 | 244 | foreach (scandir($extensionPath) as $extension) { |
@@ -340,6 +346,9 @@ discard block |
||
340 | 346 | } |
341 | 347 | } |
342 | 348 | |
349 | + /** |
|
350 | + * @param string $line |
|
351 | + */ |
|
343 | 352 | protected function fixParamTypes($line) |
344 | 353 | { |
345 | 354 | return preg_replace_callback('~@(param|return) ([\w\\|]+)~i', function ($matches) { |
@@ -473,6 +482,10 @@ discard block |
||
473 | 482 | // TODO |
474 | 483 | } |
475 | 484 | |
485 | + /** |
|
486 | + * @param null|string $className |
|
487 | + * @param string $propertyDoc |
|
488 | + */ |
|
476 | 489 | protected function updateClassPropertyDocs($file, $className, $propertyDoc) |
477 | 490 | { |
478 | 491 | try { |
@@ -553,7 +566,7 @@ discard block |
||
553 | 566 | /** |
554 | 567 | * remove multi empty lines and trim trailing whitespace. |
555 | 568 | * |
556 | - * @param $doc |
|
569 | + * @param string $doc |
|
557 | 570 | * @return string |
558 | 571 | */ |
559 | 572 | protected function cleanDocComment($doc) |
@@ -572,7 +585,7 @@ discard block |
||
572 | 585 | |
573 | 586 | /** |
574 | 587 | * Replace property annotations in doc comment. |
575 | - * @param $doc |
|
588 | + * @param string $doc |
|
576 | 589 | * @param $properties |
577 | 590 | * @return string |
578 | 591 | */ |
@@ -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 = []; |
@@ -762,6 +778,9 @@ discard block |
||
762 | 778 | return $sets; |
763 | 779 | } |
764 | 780 | |
781 | + /** |
|
782 | + * @param string $str |
|
783 | + */ |
|
765 | 784 | protected function fixSentence($str) |
766 | 785 | { |
767 | 786 | // TODO fix word wrap |
@@ -771,6 +790,9 @@ discard block |
||
771 | 790 | return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : ''); |
772 | 791 | } |
773 | 792 | |
793 | + /** |
|
794 | + * @param string $param |
|
795 | + */ |
|
774 | 796 | protected function getPropParam($prop, $param) |
775 | 797 | { |
776 | 798 | return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]); |
@@ -622,7 +622,7 @@ |
||
622 | 622 | * Finds out a line of the first non-char PHP token found. |
623 | 623 | * |
624 | 624 | * @param array $tokens |
625 | - * @return int|string |
|
625 | + * @return string |
|
626 | 626 | * @since 2.0.1 |
627 | 627 | */ |
628 | 628 | protected function getLine($tokens) |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Get the error code from the last operation. |
54 | 54 | * @link http://php.net/manual/en/messageformatter.geterrorcode.php |
55 | - * @return string Code of the last error. |
|
55 | + * @return integer Code of the last error. |
|
56 | 56 | */ |
57 | 57 | public function getErrorCode() |
58 | 58 | { |
@@ -321,7 +321,7 @@ |
||
321 | 321 | * Parses date string into UNIX timestamp. |
322 | 322 | * |
323 | 323 | * @param string $value string representing date |
324 | - * @return int|false a UNIX timestamp or `false` on failure. |
|
324 | + * @return integer a UNIX timestamp or `false` on failure. |
|
325 | 325 | */ |
326 | 326 | protected function parseDateValue($value) |
327 | 327 | { |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * @param string $cacheKey generated cache key to store data. |
453 | 453 | * @param string $route the route (e.g. `site/index`). |
454 | 454 | * @param array $params rule params. |
455 | - * @return bool|string the created URL |
|
455 | + * @return string|false the created URL |
|
456 | 456 | * @see createUrl() |
457 | 457 | * @since 2.0.8 |
458 | 458 | */ |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | |
474 | 474 | /** |
475 | 475 | * Store rule (e.g. [[UrlRule]]) to internal cache. |
476 | - * @param $cacheKey |
|
476 | + * @param string $cacheKey |
|
477 | 477 | * @param UrlRuleInterface $rule |
478 | 478 | * @since 2.0.8 |
479 | 479 | */ |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | * Note that unlike [[\yii\helpers\Url::toRoute()]], this method always treats the given route |
491 | 491 | * as an absolute route. |
492 | 492 | * |
493 | - * @param string|array $params use a string to represent a route (e.g. `site/index`), |
|
493 | + * @param string[] $params use a string to represent a route (e.g. `site/index`), |
|
494 | 494 | * or an array to represent a route with query parameters (e.g. `['site/index', 'param1' => 'value1']`). |
495 | 495 | * @param string|null $scheme the scheme to use for the URL (either `http`, `https` or empty string |
496 | 496 | * for protocol-relative URL). |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | |
367 | 367 | /** |
368 | 368 | * @param array $what list of items |
369 | - * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
369 | + * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
370 | 370 | * @param bool $ensureGitClean |
371 | 371 | * @throws \yii\base\Exception |
372 | 372 | */ |
@@ -546,6 +546,10 @@ discard block |
||
546 | 546 | $this->stdout("\n"); |
547 | 547 | } |
548 | 548 | |
549 | + /** |
|
550 | + * @param string $name |
|
551 | + * @param string $path |
|
552 | + */ |
|
549 | 553 | protected function releaseApplication($name, $path, $version) |
550 | 554 | { |
551 | 555 | $this->stdout("\n"); |
@@ -648,6 +652,9 @@ discard block |
||
648 | 652 | Yii::setAlias('@app', $this->_oldAlias); |
649 | 653 | } |
650 | 654 | |
655 | + /** |
|
656 | + * @param string $name |
|
657 | + */ |
|
651 | 658 | protected function packageApplication($name, $version, $packagePath) |
652 | 659 | { |
653 | 660 | FileHelper::createDirectory($packagePath); |
@@ -809,6 +816,9 @@ discard block |
||
809 | 816 | } |
810 | 817 | |
811 | 818 | |
819 | + /** |
|
820 | + * @param string[] $what |
|
821 | + */ |
|
812 | 822 | protected function closeChangelogs($what, $version) |
813 | 823 | { |
814 | 824 | $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); |
@@ -820,6 +830,9 @@ discard block |
||
820 | 830 | ); |
821 | 831 | } |
822 | 832 | |
833 | + /** |
|
834 | + * @param string[] $what |
|
835 | + */ |
|
823 | 836 | protected function openChangelogs($what, $version) |
824 | 837 | { |
825 | 838 | $headline = "\n$version under development\n"; |
@@ -981,6 +994,9 @@ discard block |
||
981 | 994 | $frameworkPath . '/BaseYii.php'); |
982 | 995 | } |
983 | 996 | |
997 | + /** |
|
998 | + * @param string $pattern |
|
999 | + */ |
|
984 | 1000 | protected function sed($pattern, $replace, $files) |
985 | 1001 | { |
986 | 1002 | foreach ((array) $files as $file) { |
@@ -1013,6 +1029,9 @@ discard block |
||
1013 | 1029 | const MINOR = 'minor'; |
1014 | 1030 | const PATCH = 'patch'; |
1015 | 1031 | |
1032 | + /** |
|
1033 | + * @param string $type |
|
1034 | + */ |
|
1016 | 1035 | protected function getNextVersions(array $versions, $type) |
1017 | 1036 | { |
1018 | 1037 | foreach ($versions as $k => $v) { |