@@ -409,6 +409,7 @@ |
||
| 409 | 409 | |
| 410 | 410 | /** |
| 411 | 411 | * @inheritdoc |
| 412 | + * @param Query $query |
|
| 412 | 413 | */ |
| 413 | 414 | public function build($query, $params = []) |
| 414 | 415 | { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | /** |
| 91 | 91 | * This method contains the logic to be executed when applying this migration. |
| 92 | 92 | * Child classes may override this method to provide actual migration logic. |
| 93 | - * @return bool return a false value to indicate the migration fails |
|
| 93 | + * @return false|null return a false value to indicate the migration fails |
|
| 94 | 94 | * and should not proceed further. All other return values mean the migration succeeds. |
| 95 | 95 | */ |
| 96 | 96 | public function up() |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * This method contains the logic to be executed when removing this migration. |
| 120 | 120 | * The default implementation throws an exception indicating the migration cannot be removed. |
| 121 | 121 | * Child classes may override this method if the corresponding migrations can be removed. |
| 122 | - * @return bool return a false value to indicate the migration fails |
|
| 122 | + * @return false|null return a false value to indicate the migration fails |
|
| 123 | 123 | * and should not proceed further. All other return values mean the migration succeeds. |
| 124 | 124 | */ |
| 125 | 125 | public function down() |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * please refer to [implicit commit](http://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html). If this is the case, |
| 165 | 165 | * you should still implement `up()` and `down()`, instead. |
| 166 | 166 | * |
| 167 | - * @return bool return a false value to indicate the migration fails |
|
| 167 | + * @return boolean|null return a false value to indicate the migration fails |
|
| 168 | 168 | * and should not proceed further. All other return values mean the migration succeeds. |
| 169 | 169 | */ |
| 170 | 170 | public function safeUp() |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * please refer to [implicit commit](http://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html). If this is the case, |
| 183 | 183 | * you should still implement `up()` and `down()`, instead. |
| 184 | 184 | * |
| 185 | - * @return bool return a false value to indicate the migration fails |
|
| 185 | + * @return boolean|null return a false value to indicate the migration fails |
|
| 186 | 186 | * and should not proceed further. All other return values mean the migration succeeds. |
| 187 | 187 | */ |
| 188 | 188 | public function safeDown() |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * The method will properly quote the table and column names. |
| 402 | 402 | * @param string $name the name of the primary key constraint. |
| 403 | 403 | * @param string $table the table that the primary key constraint will be added to. |
| 404 | - * @param string|array $columns comma separated string or array of columns that the primary key will consist of. |
|
| 404 | + * @param string[] $columns comma separated string or array of columns that the primary key will consist of. |
|
| 405 | 405 | */ |
| 406 | 406 | public function addPrimaryKey($name, $table, $columns) |
| 407 | 407 | { |
@@ -429,9 +429,9 @@ discard block |
||
| 429 | 429 | * The method will properly quote the table and column names. |
| 430 | 430 | * @param string $name the name of the foreign key constraint. |
| 431 | 431 | * @param string $table the table that the foreign key constraint will be added to. |
| 432 | - * @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. |
|
| 432 | + * @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. |
|
| 433 | 433 | * @param string $refTable the table that the foreign key references to. |
| 434 | - * @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. |
|
| 434 | + * @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. |
|
| 435 | 435 | * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL |
| 436 | 436 | * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL |
| 437 | 437 | */ |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | * Builds and executes a SQL statement for creating a new index. |
| 461 | 461 | * @param string $name the name of the index. The name will be properly quoted by the method. |
| 462 | 462 | * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method. |
| 463 | - * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them |
|
| 463 | + * @param string $columns the column(s) that should be included in the index. If there are multiple columns, please separate them |
|
| 464 | 464 | * by commas or use an array. Each column name will be properly quoted by the method. Quoting will be skipped for column names that |
| 465 | 465 | * include a left parenthesis "(". |
| 466 | 466 | * @param bool $unique whether to add UNIQUE constraint on the created index. |
@@ -216,7 +216,7 @@ |
||
| 216 | 216 | |
| 217 | 217 | /** |
| 218 | 218 | * Generates a link tag that refers to an external CSS file. |
| 219 | - * @param array|string $url the URL of the external CSS file. This parameter will be processed by [[Url::to()]]. |
|
| 219 | + * @param string|boolean $url the URL of the external CSS file. This parameter will be processed by [[Url::to()]]. |
|
| 220 | 220 | * @param array $options the tag options in terms of name-value pairs. The following options are specially handled: |
| 221 | 221 | * |
| 222 | 222 | * - condition: specifies the conditional comments for IE, e.g., `lt IE 9`. When this is specified, |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | * @param UrlManager $manager the URL manager |
| 416 | 416 | * @param string $route the route. It should not have slashes at the beginning or the end. |
| 417 | 417 | * @param array $params the parameters |
| 418 | - * @return string|bool the created URL, or `false` if this rule cannot be used for creating this URL. |
|
| 418 | + * @return false|string the created URL, or `false` if this rule cannot be used for creating this URL. |
|
| 419 | 419 | */ |
| 420 | 420 | public function createUrl($manager, $route, $params) |
| 421 | 421 | { |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | * When found - replaces this placeholder key with a appropriate name of matching parameter. |
| 514 | 514 | * Used in [[parseRequest()]], [[createUrl()]]. |
| 515 | 515 | * |
| 516 | - * @param array $matches result of `preg_match()` call |
|
| 516 | + * @param string[] $matches result of `preg_match()` call |
|
| 517 | 517 | * @return array input array with replaced placeholder keys |
| 518 | 518 | * @see placeholders |
| 519 | 519 | * @since 2.0.7 |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * yii migrate/down all # revert all migrations |
| 204 | 204 | * ``` |
| 205 | 205 | * |
| 206 | - * @param int|string $limit the number of migrations to be reverted. Defaults to 1, |
|
| 206 | + * @param integer $limit the number of migrations to be reverted. Defaults to 1, |
|
| 207 | 207 | * meaning the last applied migration will be reverted. When value is "all", all migrations will be reverted. |
| 208 | 208 | * @throws Exception if the number of the steps specified is less than 1. |
| 209 | 209 | * |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | * yii migrate/redo all # redo all migrations |
| 266 | 266 | * ``` |
| 267 | 267 | * |
| 268 | - * @param int|string $limit the number of migrations to be redone. Defaults to 1, |
|
| 268 | + * @param integer $limit the number of migrations to be redone. Defaults to 1, |
|
| 269 | 269 | * meaning the last applied migration will be redone. When equals "all", all migrations will be redone. |
| 270 | 270 | * @throws Exception if the number of the steps specified is less than 1. |
| 271 | 271 | * |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | * yii migrate/history all # showing the whole history |
| 463 | 463 | * ``` |
| 464 | 464 | * |
| 465 | - * @param int|string $limit the maximum number of migrations to be displayed. |
|
| 465 | + * @param integer $limit the maximum number of migrations to be displayed. |
|
| 466 | 466 | * If it is "all", the whole migration history will be displayed. |
| 467 | 467 | * @throws \yii\console\Exception if invalid limit value passed |
| 468 | 468 | */ |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | * yii migrate/new all # showing all new migrations |
| 507 | 507 | * ``` |
| 508 | 508 | * |
| 509 | - * @param int|string $limit the maximum number of new migrations to be displayed. |
|
| 509 | + * @param integer $limit the maximum number of new migrations to be displayed. |
|
| 510 | 510 | * If it is `all`, all available new migrations will be displayed. |
| 511 | 511 | * @throws \yii\console\Exception if invalid limit value passed |
| 512 | 512 | */ |
@@ -558,7 +558,7 @@ |
||
| 558 | 558 | /** |
| 559 | 559 | * Loads the column information into a [[ColumnSchema]] object. |
| 560 | 560 | * @param array $info column information |
| 561 | - * @return ColumnSchema the column schema object |
|
| 561 | + * @return \yii\db\ColumnSchema the column schema object |
|
| 562 | 562 | */ |
| 563 | 563 | protected function loadColumnSchema($info) |
| 564 | 564 | { |
@@ -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 | */ |
@@ -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,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) { |
@@ -476,6 +485,10 @@ discard block |
||
| 476 | 485 | // TODO |
| 477 | 486 | } |
| 478 | 487 | |
| 488 | + /** |
|
| 489 | + * @param null|string $className |
|
| 490 | + * @param string $propertyDoc |
|
| 491 | + */ |
|
| 479 | 492 | protected function updateClassPropertyDocs($file, $className, $propertyDoc) |
| 480 | 493 | { |
| 481 | 494 | try { |
@@ -556,7 +569,7 @@ discard block |
||
| 556 | 569 | /** |
| 557 | 570 | * remove multi empty lines and trim trailing whitespace. |
| 558 | 571 | * |
| 559 | - * @param $doc |
|
| 572 | + * @param string $doc |
|
| 560 | 573 | * @return string |
| 561 | 574 | */ |
| 562 | 575 | protected function cleanDocComment($doc) |
@@ -575,7 +588,7 @@ discard block |
||
| 575 | 588 | |
| 576 | 589 | /** |
| 577 | 590 | * Replace property annotations in doc comment. |
| 578 | - * @param $doc |
|
| 591 | + * @param string $doc |
|
| 579 | 592 | * @param $properties |
| 580 | 593 | * @return string |
| 581 | 594 | */ |
@@ -742,6 +755,9 @@ discard block |
||
| 742 | 755 | return [$className, $phpdoc]; |
| 743 | 756 | } |
| 744 | 757 | |
| 758 | + /** |
|
| 759 | + * @param string $pattern |
|
| 760 | + */ |
|
| 745 | 761 | protected function match($pattern, $subject, $split = false) |
| 746 | 762 | { |
| 747 | 763 | $sets = []; |
@@ -766,6 +782,9 @@ discard block |
||
| 766 | 782 | return $sets; |
| 767 | 783 | } |
| 768 | 784 | |
| 785 | + /** |
|
| 786 | + * @param string $str |
|
| 787 | + */ |
|
| 769 | 788 | protected function fixSentence($str) |
| 770 | 789 | { |
| 771 | 790 | // TODO fix word wrap |
@@ -776,6 +795,9 @@ discard block |
||
| 776 | 795 | return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : ''); |
| 777 | 796 | } |
| 778 | 797 | |
| 798 | + /** |
|
| 799 | + * @param string $param |
|
| 800 | + */ |
|
| 779 | 801 | protected function getPropParam($prop, $param) |
| 780 | 802 | { |
| 781 | 803 | return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]); |