@@ -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) { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | /** |
102 | 102 | * @inheritdoc |
103 | - * @return static|null ActiveRecord instance matching the condition, or `null` if nothing matches. |
|
103 | + * @return BaseActiveRecord ActiveRecord instance matching the condition, or `null` if nothing matches. |
|
104 | 104 | */ |
105 | 105 | public static function findOne($condition) |
106 | 106 | { |
@@ -397,7 +397,7 @@ |
||
397 | 397 | * not mean, that the relations are populated from the query result. An |
398 | 398 | * extra query will still be performed to bring in the related data. |
399 | 399 | * Defaults to `true`. |
400 | - * @param string|array $joinType the join type of the relations specified in `$with`. |
|
400 | + * @param string $joinType the join type of the relations specified in `$with`. |
|
401 | 401 | * When this is a string, it applies to all relations specified in `$with`. Use an array |
402 | 402 | * in the format of `relationName => joinType` to specify different join types for different relations. |
403 | 403 | * @return $this the query object itself |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | /** |
106 | 106 | * This method contains the logic to be executed when applying this migration. |
107 | 107 | * Child classes may override this method to provide actual migration logic. |
108 | - * @return bool return a false value to indicate the migration fails |
|
108 | + * @return false|null return a false value to indicate the migration fails |
|
109 | 109 | * and should not proceed further. All other return values mean the migration succeeds. |
110 | 110 | */ |
111 | 111 | public function up() |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * This method contains the logic to be executed when removing this migration. |
135 | 135 | * The default implementation throws an exception indicating the migration cannot be removed. |
136 | 136 | * Child classes may override this method if the corresponding migrations can be removed. |
137 | - * @return bool return a false value to indicate the migration fails |
|
137 | + * @return false|null return a false value to indicate the migration fails |
|
138 | 138 | * and should not proceed further. All other return values mean the migration succeeds. |
139 | 139 | */ |
140 | 140 | public function down() |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Note: Not all DBMS support transactions. And some DB queries cannot be put into a transaction. For some examples, |
179 | 179 | * please refer to [implicit commit](http://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html). |
180 | 180 | * |
181 | - * @return bool return a false value to indicate the migration fails |
|
181 | + * @return boolean|null return a false value to indicate the migration fails |
|
182 | 182 | * and should not proceed further. All other return values mean the migration succeeds. |
183 | 183 | */ |
184 | 184 | public function safeUp() |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * Note: Not all DBMS support transactions. And some DB queries cannot be put into a transaction. For some examples, |
196 | 196 | * please refer to [implicit commit](http://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html). |
197 | 197 | * |
198 | - * @return bool return a false value to indicate the migration fails |
|
198 | + * @return boolean|null return a false value to indicate the migration fails |
|
199 | 199 | * and should not proceed further. All other return values mean the migration succeeds. |
200 | 200 | */ |
201 | 201 | public function safeDown() |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * The method will properly quote the table and column names. |
407 | 407 | * @param string $name the name of the primary key constraint. |
408 | 408 | * @param string $table the table that the primary key constraint will be added to. |
409 | - * @param string|array $columns comma separated string or array of columns that the primary key will consist of. |
|
409 | + * @param string[] $columns comma separated string or array of columns that the primary key will consist of. |
|
410 | 410 | */ |
411 | 411 | public function addPrimaryKey($name, $table, $columns) |
412 | 412 | { |
@@ -432,9 +432,9 @@ discard block |
||
432 | 432 | * The method will properly quote the table and column names. |
433 | 433 | * @param string $name the name of the foreign key constraint. |
434 | 434 | * @param string $table the table that the foreign key constraint will be added to. |
435 | - * @param string|array $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array. |
|
435 | + * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array. |
|
436 | 436 | * @param string $refTable the table that the foreign key references to. |
437 | - * @param string|array $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array. |
|
437 | + * @param string $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array. |
|
438 | 438 | * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL |
439 | 439 | * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL |
440 | 440 | */ |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | * Builds and executes a SQL statement for creating a new index. |
462 | 462 | * @param string $name the name of the index. The name will be properly quoted by the method. |
463 | 463 | * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method. |
464 | - * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them |
|
464 | + * @param string $columns the column(s) that should be included in the index. If there are multiple columns, please separate them |
|
465 | 465 | * by commas or use an array. Each column name will be properly quoted by the method. Quoting will be skipped for column names that |
466 | 466 | * include a left parenthesis "(". |
467 | 467 | * @param bool $unique whether to add UNIQUE constraint on the created index. |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @param array $a array to be merged to |
113 | 113 | * @param array $b array to be merged from. You can specify additional |
114 | 114 | * arrays via third argument, fourth argument etc. |
115 | - * @return array the merged array (the original arrays are not changed.) |
|
115 | + * @return callable the merged array (the original arrays are not changed.) |
|
116 | 116 | */ |
117 | 117 | public static function merge($a, $b) |
118 | 118 | { |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | * ``` |
448 | 448 | * |
449 | 449 | * @param array $array the array that needs to be indexed or grouped |
450 | - * @param string|\Closure|null $key the column name or anonymous function which result will be used to index the array |
|
450 | + * @param null|string $key the column name or anonymous function which result will be used to index the array |
|
451 | 451 | * @param string|string[]|\Closure[]|null $groups the array of keys, that will be used to group the input array |
452 | 452 | * by one or more keys. If the $key attribute or its value for the particular element is null and $groups is not |
453 | 453 | * defined, the array element will be discarded. Otherwise, if $groups is specified, array element will be added |
@@ -567,8 +567,8 @@ discard block |
||
567 | 567 | * ``` |
568 | 568 | * |
569 | 569 | * @param array $array |
570 | - * @param string|\Closure $from |
|
571 | - * @param string|\Closure $to |
|
570 | + * @param string $from |
|
571 | + * @param string $to |
|
572 | 572 | * @param string|\Closure $group |
573 | 573 | * @return array |
574 | 574 | */ |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | * To sort by multiple keys, provide an array of keys here. |
624 | 624 | * @param int|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`. |
625 | 625 | * When sorting by multiple keys with different sorting directions, use an array of sorting directions. |
626 | - * @param int|array $sortFlag the PHP sort flag. Valid values include |
|
626 | + * @param integer $sortFlag the PHP sort flag. Valid values include |
|
627 | 627 | * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`. |
628 | 628 | * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php) |
629 | 629 | * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags. |