Completed
Pull Request — 2.1 (#15488)
by Nikolay
37:27
created
framework/web/UrlManager.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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).
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
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
framework/http/MessageTrait.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
framework/http/Uri.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
framework/console/controllers/CacheController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
     /**
237 237
      * Prompts user with confirmation if caches should be cleared.
238 238
      * @param array $cachesNames
239
-     * @return bool
239
+     * @return boolean|null
240 240
      */
241 241
     private function confirmClear($cachesNames)
242 242
     {
Please login to merge, or discard this patch.
build/controllers/PhpDocController.php 1 patch
Doc Comments   +20 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,6 +113,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
@@ -556,7 +565,7 @@  discard block
 block discarded – undo
556 565
     /**
557 566
      * remove multi empty lines and trim trailing whitespace.
558 567
      *
559
-     * @param $doc
568
+     * @param string $doc
560 569
      * @return string
561 570
      */
562 571
     protected function cleanDocComment($doc)
@@ -575,7 +584,7 @@  discard block
 block discarded – undo
575 584
 
576 585
     /**
577 586
      * Replace property annotations in doc comment.
578
-     * @param $doc
587
+     * @param string $doc
579 588
      * @param $properties
580 589
      * @return string
581 590
      */
@@ -742,6 +751,9 @@  discard block
 block discarded – undo
742 751
         return [$className, $phpdoc];
743 752
     }
744 753
 
754
+    /**
755
+     * @param string $pattern
756
+     */
745 757
     protected function match($pattern, $subject, $split = false)
746 758
     {
747 759
         $sets = [];
@@ -766,6 +778,9 @@  discard block
 block discarded – undo
766 778
         return $sets;
767 779
     }
768 780
 
781
+    /**
782
+     * @param string $str
783
+     */
769 784
     protected function fixSentence($str)
770 785
     {
771 786
         // TODO fix word wrap
@@ -776,6 +791,9 @@  discard block
 block discarded – undo
776 791
         return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : '');
777 792
     }
778 793
 
794
+    /**
795
+     * @param string $param
796
+     */
779 797
     protected function getPropParam($prop, $param)
780 798
     {
781 799
         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/caching/Cache.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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.
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
     /**
309 309
      * Deletes a value with the specified key from cache.
310
-     * @param mixed $key a key identifying the value to be deleted from cache. This can be a simple string or
310
+     * @param string $key a key identifying the value to be deleted from cache. This can be a simple string or
311 311
      * a complex data structure consisting of factors representing the key.
312 312
      * @return bool if no error happens during deletion
313 313
      */
Please login to merge, or discard this patch.
framework/db/BaseActiveRecord.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
framework/web/MultipartFormDataParser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
     /**
213 213
      * Parses content part headers.
214 214
      * @param string $headerContent headers source content
215
-     * @return array parsed headers.
215
+     * @return callable parsed headers.
216 216
      */
217 217
     private function parseHeaders($headerContent)
218 218
     {
Please login to merge, or discard this patch.