@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | /** |
244 | 244 | * Binds a parameter to the SQL statement to be executed. |
245 | - * @param string|int $name parameter identifier. For a prepared statement |
|
245 | + * @param string $name parameter identifier. For a prepared statement |
|
246 | 246 | * using named placeholders, this will be a parameter name of |
247 | 247 | * the form `:name`. For a prepared statement using question mark |
248 | 248 | * placeholders, this will be the 1-indexed position of the parameter. |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | /** |
380 | 380 | * Executes the SQL statement and returns the value of the first column in the first row of data. |
381 | 381 | * This method is best used when only a single value is needed for a query. |
382 | - * @return string|null|false the value of the first column in the first row of the query result. |
|
382 | + * @return string the value of the first column in the first row of the query result. |
|
383 | 383 | * False is returned if there is no value. |
384 | 384 | * @throws Exception execution failed |
385 | 385 | */ |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | /** |
370 | 370 | * @param array $what list of items |
371 | - * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
371 | + * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
372 | 372 | * @param bool $ensureGitClean |
373 | 373 | * @throws \yii\base\Exception |
374 | 374 | */ |
@@ -548,6 +548,10 @@ discard block |
||
548 | 548 | $this->stdout("\n"); |
549 | 549 | } |
550 | 550 | |
551 | + /** |
|
552 | + * @param string $name |
|
553 | + * @param string $path |
|
554 | + */ |
|
551 | 555 | protected function releaseApplication($name, $path, $version) |
552 | 556 | { |
553 | 557 | $this->stdout("\n"); |
@@ -650,6 +654,9 @@ discard block |
||
650 | 654 | Yii::setAlias('@app', $this->_oldAlias); |
651 | 655 | } |
652 | 656 | |
657 | + /** |
|
658 | + * @param string $name |
|
659 | + */ |
|
653 | 660 | protected function packageApplication($name, $version, $packagePath) |
654 | 661 | { |
655 | 662 | FileHelper::createDirectory($packagePath); |
@@ -811,6 +818,9 @@ discard block |
||
811 | 818 | } |
812 | 819 | |
813 | 820 | |
821 | + /** |
|
822 | + * @param string[] $what |
|
823 | + */ |
|
814 | 824 | protected function closeChangelogs($what, $version) |
815 | 825 | { |
816 | 826 | $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); |
@@ -822,6 +832,9 @@ discard block |
||
822 | 832 | ); |
823 | 833 | } |
824 | 834 | |
835 | + /** |
|
836 | + * @param string[] $what |
|
837 | + */ |
|
825 | 838 | protected function openChangelogs($what, $version) |
826 | 839 | { |
827 | 840 | $headline = "\n$version under development\n"; |
@@ -986,6 +999,9 @@ discard block |
||
986 | 999 | $frameworkPath . '/BaseYii.php'); |
987 | 1000 | } |
988 | 1001 | |
1002 | + /** |
|
1003 | + * @param string $pattern |
|
1004 | + */ |
|
989 | 1005 | protected function sed($pattern, $replace, $files) |
990 | 1006 | { |
991 | 1007 | foreach ((array) $files as $file) { |
@@ -1019,6 +1035,9 @@ discard block |
||
1019 | 1035 | const MINOR = 'minor'; |
1020 | 1036 | const PATCH = 'patch'; |
1021 | 1037 | |
1038 | + /** |
|
1039 | + * @param string $type |
|
1040 | + */ |
|
1022 | 1041 | protected function getNextVersions(array $versions, $type) |
1023 | 1042 | { |
1024 | 1043 | foreach ($versions as $k => $v) { |
@@ -623,7 +623,7 @@ |
||
623 | 623 | * Finds out a line of the first non-char PHP token found. |
624 | 624 | * |
625 | 625 | * @param array $tokens |
626 | - * @return int|string |
|
626 | + * @return string |
|
627 | 627 | * @since 2.0.1 |
628 | 628 | */ |
629 | 629 | 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 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | * @param string $cacheKey generated cache key to store data. |
454 | 454 | * @param string $route the route (e.g. `site/index`). |
455 | 455 | * @param array $params rule params. |
456 | - * @return bool|string the created URL |
|
456 | + * @return string|false the created URL |
|
457 | 457 | * @see createUrl() |
458 | 458 | * @since 2.0.8 |
459 | 459 | */ |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | |
476 | 476 | /** |
477 | 477 | * Store rule (e.g. [[UrlRule]]) to internal cache. |
478 | - * @param $cacheKey |
|
478 | + * @param string $cacheKey |
|
479 | 479 | * @param UrlRuleInterface $rule |
480 | 480 | * @since 2.0.8 |
481 | 481 | */ |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | * Note that unlike [[\yii\helpers\Url::toRoute()]], this method always treats the given route |
493 | 493 | * as an absolute route. |
494 | 494 | * |
495 | - * @param string|array $params use a string to represent a route (e.g. `site/index`), |
|
495 | + * @param string[] $params use a string to represent a route (e.g. `site/index`), |
|
496 | 496 | * or an array to represent a route with query parameters (e.g. `['site/index', 'param1' => 'value1']`). |
497 | 497 | * @param string|null $scheme the scheme to use for the URL (either `http`, `https` or empty string |
498 | 498 | * for protocol-relative URL). |
@@ -537,7 +537,7 @@ |
||
537 | 537 | |
538 | 538 | /** |
539 | 539 | * Returns the request component. |
540 | - * @return \yii\web\Request|\yii\console\Request the request component. |
|
540 | + * @return Request the request component. |
|
541 | 541 | */ |
542 | 542 | public function getRequest() |
543 | 543 | { |
@@ -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. |