@@ -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) { |
@@ -553,7 +562,7 @@ discard block |
||
553 | 562 | /** |
554 | 563 | * remove multi empty lines and trim trailing whitespace |
555 | 564 | * |
556 | - * @param $doc |
|
565 | + * @param string $doc |
|
557 | 566 | * @return string |
558 | 567 | */ |
559 | 568 | protected function cleanDocComment($doc) |
@@ -572,7 +581,7 @@ discard block |
||
572 | 581 | |
573 | 582 | /** |
574 | 583 | * Replace property annotations in doc comment |
575 | - * @param $doc |
|
584 | + * @param string $doc |
|
576 | 585 | * @param $properties |
577 | 586 | * @return string |
578 | 587 | */ |
@@ -739,6 +748,9 @@ discard block |
||
739 | 748 | return [$className, $phpdoc]; |
740 | 749 | } |
741 | 750 | |
751 | + /** |
|
752 | + * @param string $pattern |
|
753 | + */ |
|
742 | 754 | protected function match($pattern, $subject, $split = false) |
743 | 755 | { |
744 | 756 | $sets = []; |
@@ -762,6 +774,9 @@ discard block |
||
762 | 774 | return $sets; |
763 | 775 | } |
764 | 776 | |
777 | + /** |
|
778 | + * @param string $str |
|
779 | + */ |
|
765 | 780 | protected function fixSentence($str) |
766 | 781 | { |
767 | 782 | // TODO fix word wrap |
@@ -771,6 +786,9 @@ discard block |
||
771 | 786 | return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : ''); |
772 | 787 | } |
773 | 788 | |
789 | + /** |
|
790 | + * @param string $param |
|
791 | + */ |
|
774 | 792 | protected function getPropParam($prop, $param) |
775 | 793 | { |
776 | 794 | return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]); |
@@ -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 | * @throws \yii\base\Exception |
371 | 371 | */ |
372 | 372 | protected function validateWhat(array $what, $limit = [], $ensureGitClean = true) |
@@ -545,6 +545,10 @@ discard block |
||
545 | 545 | $this->stdout("\n"); |
546 | 546 | } |
547 | 547 | |
548 | + /** |
|
549 | + * @param string $name |
|
550 | + * @param string $path |
|
551 | + */ |
|
548 | 552 | protected function releaseApplication($name, $path, $version) |
549 | 553 | { |
550 | 554 | $this->stdout("\n"); |
@@ -647,6 +651,9 @@ discard block |
||
647 | 651 | Yii::setAlias('@app', $this->_oldAlias); |
648 | 652 | } |
649 | 653 | |
654 | + /** |
|
655 | + * @param string $name |
|
656 | + */ |
|
650 | 657 | protected function packageApplication($name, $version, $packagePath) |
651 | 658 | { |
652 | 659 | FileHelper::createDirectory($packagePath); |
@@ -808,6 +815,9 @@ discard block |
||
808 | 815 | } |
809 | 816 | |
810 | 817 | |
818 | + /** |
|
819 | + * @param string[] $what |
|
820 | + */ |
|
811 | 821 | protected function closeChangelogs($what, $version) |
812 | 822 | { |
813 | 823 | $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); |
@@ -819,6 +829,9 @@ discard block |
||
819 | 829 | ); |
820 | 830 | } |
821 | 831 | |
832 | + /** |
|
833 | + * @param string[] $what |
|
834 | + */ |
|
822 | 835 | protected function openChangelogs($what, $version) |
823 | 836 | { |
824 | 837 | $headline = "\n$version under development\n"; |
@@ -880,6 +893,7 @@ discard block |
||
880 | 893 | |
881 | 894 | /** |
882 | 895 | * Ensure sorting of the changelog lines |
896 | + * @param string[] $changelog |
|
883 | 897 | */ |
884 | 898 | protected function resortChangelog($changelog) |
885 | 899 | { |
@@ -975,6 +989,9 @@ discard block |
||
975 | 989 | $frameworkPath . '/BaseYii.php'); |
976 | 990 | } |
977 | 991 | |
992 | + /** |
|
993 | + * @param string $pattern |
|
994 | + */ |
|
978 | 995 | protected function sed($pattern, $replace, $files) |
979 | 996 | { |
980 | 997 | foreach ((array) $files as $file) { |
@@ -1007,6 +1024,9 @@ discard block |
||
1007 | 1024 | const MINOR = 'minor'; |
1008 | 1025 | const PATCH = 'patch'; |
1009 | 1026 | |
1027 | + /** |
|
1028 | + * @param string $type |
|
1029 | + */ |
|
1010 | 1030 | protected function getNextVersions(array $versions, $type) |
1011 | 1031 | { |
1012 | 1032 | foreach ($versions as $k => $v) { |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | * ``` |
447 | 447 | * |
448 | 448 | * @param array $array the array that needs to be indexed or grouped |
449 | - * @param string|\Closure|null $key the column name or anonymous function which result will be used to index the array |
|
449 | + * @param null|string $key the column name or anonymous function which result will be used to index the array |
|
450 | 450 | * @param string|string[]|\Closure[]|null $groups the array of keys, that will be used to group the input array |
451 | 451 | * by one or more keys. If the $key attribute or its value for the particular element is null and $groups is not |
452 | 452 | * defined, the array element will be discarded. Otherwise, if $groups is specified, array element will be added |
@@ -566,8 +566,8 @@ discard block |
||
566 | 566 | * ``` |
567 | 567 | * |
568 | 568 | * @param array $array |
569 | - * @param string|\Closure $from |
|
570 | - * @param string|\Closure $to |
|
569 | + * @param string $from |
|
570 | + * @param string $to |
|
571 | 571 | * @param string|\Closure $group |
572 | 572 | * @return array |
573 | 573 | */ |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | * To sort by multiple keys, provide an array of keys here. |
623 | 623 | * @param int|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`. |
624 | 624 | * When sorting by multiple keys with different sorting directions, use an array of sorting directions. |
625 | - * @param int|array $sortFlag the PHP sort flag. Valid values include |
|
625 | + * @param integer $sortFlag the PHP sort flag. Valid values include |
|
626 | 626 | * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`. |
627 | 627 | * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php) |
628 | 628 | * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags. |
@@ -113,7 +113,7 @@ |
||
113 | 113 | /** |
114 | 114 | * Generates a unique key used for storing session data in cache. |
115 | 115 | * @param string $id session variable name |
116 | - * @return mixed a safe cache key associated with the session variable name |
|
116 | + * @return string[] a safe cache key associated with the session variable name |
|
117 | 117 | */ |
118 | 118 | protected function calculateKey($id) |
119 | 119 | { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * expiration time will be replaced with the new ones, respectively. |
203 | 203 | * |
204 | 204 | * @param array $items the items to be cached, as key-value pairs. |
205 | - * @param null|int|\DateInterval $ttl the TTL value of this item. If not set, default value is used. |
|
205 | + * @param integer $ttl the TTL value of this item. If not set, default value is used. |
|
206 | 206 | * @param Dependency $dependency dependency of the cached items. If the dependency changes, |
207 | 207 | * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. |
208 | 208 | * This parameter is ignored if [[serializer]] is false. |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * If the cache already contains such a key, the existing value and expiration time will be preserved. |
246 | 246 | * |
247 | 247 | * @param array $values the items to be cached, as key-value pairs. |
248 | - * @param null|int|\DateInterval $ttl the TTL value of this item. If not set, default value is used. |
|
248 | + * @param integer $ttl the TTL value of this item. If not set, default value is used. |
|
249 | 249 | * @param Dependency $dependency dependency of the cached items. If the dependency changes, |
250 | 250 | * the corresponding values in the cache will be invalidated when it is fetched via [[get()]]. |
251 | 251 | * This parameter is ignored if [[serializer]] is false. |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | |
309 | 309 | /** |
310 | 310 | * Deletes a value with the specified key from cache |
311 | - * @param mixed $key a key identifying the value to be deleted from cache. This can be a simple string or |
|
311 | + * @param string $key a key identifying the value to be deleted from cache. This can be a simple string or |
|
312 | 312 | * a complex data structure consisting of factors representing the key. |
313 | 313 | * @return bool if no error happens during deletion |
314 | 314 | */ |
@@ -69,7 +69,7 @@ |
||
69 | 69 | /** |
70 | 70 | * Invalidates all of the cached data items that are associated with any of the specified [[tags]]. |
71 | 71 | * @param \Psr\SimpleCache\CacheInterface $cache the cache component that caches the data items |
72 | - * @param string|array $tags |
|
72 | + * @param string $tags |
|
73 | 73 | */ |
74 | 74 | public static function invalidate($cache, $tags) |
75 | 75 | { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * This method retains the immutability of the message and returns an instance that has the |
219 | 219 | * new and/or updated header and value. |
220 | 220 | * @param string $name Case-insensitive header field name. |
221 | - * @param string|string[] $value Header value(s). |
|
221 | + * @param string $value Header value(s). |
|
222 | 222 | * @return static |
223 | 223 | * @throws \InvalidArgumentException for invalid header names or values. |
224 | 224 | */ |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | /** |
290 | 290 | * Specifies message body. |
291 | - * @param StreamInterface|\Closure|array $body stream instance or its DI compatible configuration. |
|
291 | + * @param StreamInterface|null $body stream instance or its DI compatible configuration. |
|
292 | 292 | */ |
293 | 293 | public function setBody($body) |
294 | 294 | { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | /** |
271 | 271 | * Specifies query string. |
272 | - * @param string|array|object $query the query string or array of query parameters. |
|
272 | + * @param string $query the query string or array of query parameters. |
|
273 | 273 | */ |
274 | 274 | public function setQuery($query) |
275 | 275 | { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | |
408 | 408 | /** |
409 | 409 | * @param string $name URI component name. |
410 | - * @param mixed $default default value, which should be returned in case component is not exist. |
|
410 | + * @param string $default default value, which should be returned in case component is not exist. |
|
411 | 411 | * @return mixed URI component value. |
412 | 412 | */ |
413 | 413 | protected function getComponent($name, $default = null) |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | |
347 | 347 | /** |
348 | 348 | * Specifies the URI instance. |
349 | - * @param UriInterface|\Closure|array $uri URI instance or its DI compatible configuration. |
|
349 | + * @param UriInterface $uri URI instance or its DI compatible configuration. |
|
350 | 350 | * @since 2.1.0 |
351 | 351 | */ |
352 | 352 | public function setUri($uri) |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | * If the parameter does not exist, the second parameter passed to this method will be returned. |
576 | 576 | * @param string $name the parameter name |
577 | 577 | * @param mixed $defaultValue the default parameter value if the parameter does not exist. |
578 | - * @return mixed the parameter value |
|
578 | + * @return string the parameter value |
|
579 | 579 | * @see getBodyParams() |
580 | 580 | * @see setBodyParams() |
581 | 581 | */ |