Completed
Push — unique-validator-fix ( 9828bd...963824 )
by Alexander
11:50
created
build/controllers/PhpDocController.php 1 patch
Doc Comments   +24 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,6 +114,9 @@  discard block
 block discarded – undo
114 114
         return array_merge(parent::options($actionID), ['updateFiles', 'skipFrameworkRequirements']);
115 115
     }
116 116
 
117
+    /**
118
+     * @param string|null $root
119
+     */
117 120
     protected function findFiles($root, $needsInclude = true)
118 121
     {
119 122
         $except = [];
@@ -237,6 +240,9 @@  discard block
 block discarded – undo
237 240
         return FileHelper::findFiles($root, $options);
238 241
     }
239 242
 
243
+    /**
244
+     * @param string $extensionPath
245
+     */
240 246
     private function setUpExtensionAliases($extensionPath)
241 247
     {
242 248
         foreach (scandir($extensionPath) as $extension) {
@@ -344,6 +350,9 @@  discard block
 block discarded – undo
344 350
         }
345 351
     }
346 352
 
353
+    /**
354
+     * @param string $line
355
+     */
347 356
     protected function fixParamTypes($line)
348 357
     {
349 358
         return preg_replace_callback('~@(param|return) ([\w\\|]+)~i', function($matches) {
@@ -477,6 +486,10 @@  discard block
 block discarded – undo
477 486
         // TODO
478 487
     }
479 488
 
489
+    /**
490
+     * @param null|string $className
491
+     * @param string $propertyDoc
492
+     */
480 493
     protected function updateClassPropertyDocs($file, $className, $propertyDoc)
481 494
     {
482 495
         try {
@@ -558,7 +571,7 @@  discard block
 block discarded – undo
558 571
     /**
559 572
      * remove multi empty lines and trim trailing whitespace
560 573
      *
561
-     * @param $doc
574
+     * @param string $doc
562 575
      * @return string
563 576
      */
564 577
     protected function cleanDocComment($doc)
@@ -577,7 +590,7 @@  discard block
 block discarded – undo
577 590
 
578 591
     /**
579 592
      * Replace property annotations in doc comment
580
-     * @param $doc
593
+     * @param string $doc
581 594
      * @param $properties
582 595
      * @return string
583 596
      */
@@ -745,6 +758,9 @@  discard block
 block discarded – undo
745 758
         return [$className, $phpdoc];
746 759
     }
747 760
 
761
+    /**
762
+     * @param string $pattern
763
+     */
748 764
     protected function match($pattern, $subject, $split = false)
749 765
     {
750 766
         $sets = [];
@@ -766,6 +782,9 @@  discard block
 block discarded – undo
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
@@ -774,6 +793,9 @@  discard block
 block discarded – undo
774 793
         return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : '');
775 794
     }
776 795
 
796
+    /**
797
+     * @param string $param
798
+     */
777 799
     protected function getPropParam($prop, $param)
778 800
     {
779 801
         return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]);
Please login to merge, or discard this patch.
framework/captcha/CaptchaAction.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
     /**
145 145
      * Generates a hash code that can be used for client-side validation.
146 146
      * @param string $code the CAPTCHA code
147
-     * @return string a hash code generated from the CAPTCHA code
147
+     * @return integer a hash code generated from the CAPTCHA code
148 148
      */
149 149
     public function generateValidationHash($code)
150 150
     {
Please login to merge, or discard this patch.
framework/db/ActiveQuery.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,7 @@
 block discarded – undo
392 392
      * @param bool|array $eagerLoading whether to eager load the relations specified in `$with`.
393 393
      * When this is a boolean, it applies to all relations specified in `$with`. Use an array
394 394
      * to explicitly list which relations in `$with` need to be eagerly loaded. Defaults to `true`.
395
-     * @param string|array $joinType the join type of the relations specified in `$with`.
395
+     * @param string $joinType the join type of the relations specified in `$with`.
396 396
      * When this is a string, it applies to all relations specified in `$with`. Use an array
397 397
      * in the format of `relationName => joinType` to specify different join types for different relations.
398 398
      * @return $this the query object itself
Please login to merge, or discard this patch.
framework/db/DataReader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     /**
115 115
      * Returns a single column from the next row of a result set.
116 116
      * @param int $columnIndex zero-based column index
117
-     * @return mixed the column of the current row, false if no more rows available
117
+     * @return string the column of the current row, false if no more rows available
118 118
      */
119 119
     public function readColumn($columnIndex)
120 120
     {
Please login to merge, or discard this patch.
framework/web/Response.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -789,7 +789,7 @@
 block discarded – undo
789 789
      * });
790 790
      * ```
791 791
      *
792
-     * @param string|array $url the URL to be redirected to. This can be in one of the following formats:
792
+     * @param string $url the URL to be redirected to. This can be in one of the following formats:
793 793
      *
794 794
      * - a string representing a URL (e.g. "http://example.com")
795 795
      * - a string representing a URL alias (e.g. "@example.com")
Please login to merge, or discard this patch.
framework/web/User.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      * stored in session and reconstruct the corresponding identity object, if it has not done so before.
176 176
      * @param bool $autoRenew whether to automatically renew authentication status if it has not been done so before.
177 177
      * This is only useful when [[enableSession]] is true.
178
-     * @return IdentityInterface|null the identity object associated with the currently logged-in user.
178
+     * @return null|boolean the identity object associated with the currently logged-in user.
179 179
      * `null` is returned if the user is not logged in (not authenticated).
180 180
      * @see login()
181 181
      * @see logout()
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      * with the provided access token. If successful, it will call [[login()]] to log in the authenticated user.
260 260
      * If authentication fails or [[login()]] is unsuccessful, it will return null.
261 261
      * @param string $token the access token
262
-     * @param mixed $type the type of the token. The value of this parameter depends on the implementation.
262
+     * @param string $type the type of the token. The value of this parameter depends on the implementation.
263 263
      * For example, [[\yii\filters\auth\HttpBearerAuth]] will set this parameter to be `yii\filters\auth\HttpBearerAuth`.
264 264
      * @return IdentityInterface|null the identity associated with the given access token. Null is returned if
265 265
      * the access token is invalid or [[login()]] is unsuccessful.
Please login to merge, or discard this patch.
build/controllers/ReleaseController.php 1 patch
Doc Comments   +20 added lines, -1 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 
368 368
     /**
369 369
      * @param array $what list of items
370
-     * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension`
370
+     * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension`
371 371
      * @throws \yii\base\Exception
372 372
      */
373 373
     protected function validateWhat(array $what, $limit = [], $ensureGitClean = true)
@@ -547,6 +547,10 @@  discard block
 block discarded – undo
547 547
 
548 548
     }
549 549
 
550
+    /**
551
+     * @param string $name
552
+     * @param string $path
553
+     */
550 554
     protected function releaseApplication($name, $path, $version)
551 555
     {
552 556
         $this->stdout("\n");
@@ -649,6 +653,9 @@  discard block
 block discarded – undo
649 653
         Yii::setAlias('@app', $this->_oldAlias);
650 654
     }
651 655
 
656
+    /**
657
+     * @param string $name
658
+     */
652 659
     protected function packageApplication($name, $version, $packagePath)
653 660
     {
654 661
         FileHelper::createDirectory($packagePath);
@@ -810,6 +817,9 @@  discard block
 block discarded – undo
810 817
     }
811 818
 
812 819
 
820
+    /**
821
+     * @param string[] $what
822
+     */
813 823
     protected function closeChangelogs($what, $version)
814 824
     {
815 825
         $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/'));
@@ -821,6 +831,9 @@  discard block
 block discarded – undo
821 831
         );
822 832
     }
823 833
 
834
+    /**
835
+     * @param string[] $what
836
+     */
824 837
     protected function openChangelogs($what, $version)
825 838
     {
826 839
         $headline = "\n$version under development\n";
@@ -977,6 +990,9 @@  discard block
 block discarded – undo
977 990
             $frameworkPath . '/BaseYii.php');
978 991
     }
979 992
 
993
+    /**
994
+     * @param string $pattern
995
+     */
980 996
     protected function sed($pattern, $replace, $files)
981 997
     {
982 998
         foreach ((array) $files as $file) {
@@ -1009,6 +1025,9 @@  discard block
 block discarded – undo
1009 1025
     const MINOR = 'minor';
1010 1026
     const PATCH = 'patch';
1011 1027
 
1028
+    /**
1029
+     * @param string $type
1030
+     */
1012 1031
     protected function getNextVersions(array $versions, $type)
1013 1032
     {
1014 1033
         foreach ($versions as $k => $v) {
Please login to merge, or discard this patch.
framework/helpers/BaseHtml.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
framework/db/Migration.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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.
Please login to merge, or discard this patch.