Completed
Pull Request — master (#11729)
by Thiago
09:02
created
framework/widgets/LinkPager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
     }
225 225
 
226 226
     /**
227
-     * @return array the begin and end pages that need to be displayed.
227
+     * @return integer[] the begin and end pages that need to be displayed.
228 228
      */
229 229
     protected function getPageRange()
230 230
     {
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
@@ -788,7 +788,7 @@
 block discarded – undo
788 788
      * In the above step 1 and 3, events named [[EVENT_BEFORE_DELETE]] and [[EVENT_AFTER_DELETE]]
789 789
      * will be raised by the corresponding methods.
790 790
      *
791
-     * @return integer|false the number of rows deleted, or false if the deletion is unsuccessful for some reason.
791
+     * @return boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
792 792
      * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
793 793
      * @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
794 794
      * being deleted is outdated.
Please login to merge, or discard this patch.
framework/db/Query.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -795,7 +795,7 @@
 block discarded – undo
795 795
 
796 796
     /**
797 797
      * Appends a SQL statement using UNION operator.
798
-     * @param string|Query $sql the SQL statement to be appended using UNION
798
+     * @param Query $sql the SQL statement to be appended using UNION
799 799
      * @param boolean $all TRUE if using UNION ALL and FALSE if using UNION
800 800
      * @return $this the query object itself
801 801
      */
Please login to merge, or discard this patch.
framework/console/Controller.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * ```
187 187
      *
188 188
      * @param string $string the string to print
189
-     * @return integer|boolean Number of bytes printed or false on error
189
+     * @return integer Number of bytes printed or false on error
190 190
      */
191 191
     public function stdout($string)
192 192
     {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * ```
212 212
      *
213 213
      * @param string $string the string to print
214
-     * @return integer|boolean Number of bytes printed or false on error
214
+     * @return integer Number of bytes printed or false on error
215 215
      */
216 216
     public function stderr($string)
217 217
     {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      *
252 252
      * @param string $message to echo out before waiting for user input
253 253
      * @param boolean $default this value is returned if no selection is made.
254
-     * @return boolean whether user confirmed.
254
+     * @return boolean|null whether user confirmed.
255 255
      * Will return true if [[interactive]] is false.
256 256
      */
257 257
     public function confirm($message, $default = false)
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      * until [[beforeAction()]] is being called.
288 288
      *
289 289
      * @param string $actionID the action id of the current request
290
-     * @return array the names of the options valid for the action
290
+     * @return string[] the names of the options valid for the action
291 291
      */
292 292
     public function options($actionID)
293 293
     {
Please login to merge, or discard this patch.
framework/console/controllers/MessageController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -574,7 +574,7 @@
 block discarded – undo
574 574
      * Finds out a line of the first non-char PHP token found
575 575
      *
576 576
      * @param array $tokens
577
-     * @return integer|string
577
+     * @return string
578 578
      * @since 2.0.1
579 579
      */
580 580
     protected function getLine($tokens)
Please login to merge, or discard this patch.
framework/helpers/BaseConsole.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
      * - windows without ansicon
576 576
      * - not tty consoles
577 577
      *
578
-     * @param mixed $stream
578
+     * @param resource $stream
579 579
      * @return boolean true if the stream supports ANSI colors, otherwise false.
580 580
      */
581 581
     public static function streamSupportsAnsiColors($stream)
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
      * @param boolean $refresh whether to force checking and not re-use cached size value.
601 601
      * This is useful to detect changing window size while the application is running but may
602 602
      * not get up to date values on every terminal.
603
-     * @return array|boolean An array of ($width, $height) or false when it was not able to determine size.
603
+     * @return string An array of ($width, $height) or false when it was not able to determine size.
604 604
      */
605 605
     public static function getScreenSize($refresh = false)
606 606
     {
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
      * Prints a string to STDOUT.
692 692
      *
693 693
      * @param string $string the string to print
694
-     * @return integer|boolean Number of bytes printed or false on error
694
+     * @return integer Number of bytes printed or false on error
695 695
      */
696 696
     public static function stdout($string)
697 697
     {
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
      * Prints a string to STDERR.
703 703
      *
704 704
      * @param string $string the string to print
705
-     * @return integer|boolean Number of bytes printed or false on error
705
+     * @return integer Number of bytes printed or false on error
706 706
      */
707 707
     public static function stderr($string)
708 708
     {
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
      * Prints text to STDOUT appended with a carriage return (PHP_EOL).
730 730
      *
731 731
      * @param string $string the text to print
732
-     * @return integer|boolean number of bytes printed or false on error.
732
+     * @return integer number of bytes printed or false on error.
733 733
      */
734 734
     public static function output($string = null)
735 735
     {
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
      * Prints text to STDERR appended with a carriage return (PHP_EOL).
741 741
      *
742 742
      * @param string $string the text to print
743
-     * @return integer|boolean number of bytes printed or false on error.
743
+     * @return integer number of bytes printed or false on error.
744 744
      */
745 745
     public static function error($string = null)
746 746
     {
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
      *
807 807
      * @param string $message to print out before waiting for user input
808 808
      * @param boolean $default this value is returned if no selection is made.
809
-     * @return boolean whether user confirmed
809
+     * @return boolean|null whether user confirmed
810 810
      */
811 811
     public static function confirm($message, $default = false)
812 812
     {
Please login to merge, or discard this patch.
framework/behaviors/AttributeBehavior.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
      * This method is called by [[evaluateAttributes()]]. Its return value will be assigned
127 127
      * to the attributes corresponding to the triggering event.
128 128
      * @param Event $event the event that triggers the current attribute updating.
129
-     * @return mixed the attribute value
129
+     * @return string the attribute value
130 130
      */
131 131
     protected function getValue($event)
132 132
     {
Please login to merge, or discard this patch.
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
         $ref = new \ReflectionClass($className);
@@ -552,7 +565,7 @@  discard block
 block discarded – undo
552 565
     /**
553 566
      * remove multi empty lines and trim trailing whitespace
554 567
      *
555
-     * @param $doc
568
+     * @param string $doc
556 569
      * @return string
557 570
      */
558 571
     protected function cleanDocComment($doc)
@@ -571,7 +584,7 @@  discard block
 block discarded – undo
571 584
 
572 585
     /**
573 586
      * Replace property annotations in doc comment
574
-     * @param $doc
587
+     * @param string $doc
575 588
      * @param $properties
576 589
      * @return string
577 590
      */
@@ -739,6 +752,9 @@  discard block
 block discarded – undo
739 752
         return [$className, $phpdoc];
740 753
     }
741 754
 
755
+    /**
756
+     * @param string $pattern
757
+     */
742 758
     protected function match($pattern, $subject, $split = false)
743 759
     {
744 760
         $sets = [];
@@ -760,6 +776,9 @@  discard block
 block discarded – undo
760 776
         return $sets;
761 777
     }
762 778
 
779
+    /**
780
+     * @param string $str
781
+     */
763 782
     protected function fixSentence($str)
764 783
     {
765 784
         // TODO fix word wrap
@@ -768,6 +787,9 @@  discard block
 block discarded – undo
768 787
         return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : '');
769 788
     }
770 789
 
790
+    /**
791
+     * @param string $param
792
+     */
771 793
     protected function getPropParam($prop, $param)
772 794
     {
773 795
         return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]);
Please login to merge, or discard this patch.
build/controllers/ReleaseController.php 1 patch
Doc Comments   +23 added lines, -1 removed lines patch added patch discarded remove patch
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
     /**
324 324
      * @param array $what list of items
325
-     * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension`
325
+     * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension`
326 326
      * @throws \yii\base\Exception
327 327
      */
328 328
     protected function validateWhat(array $what, $limit = [])
@@ -486,6 +486,10 @@  discard block
 block discarded – undo
486 486
 
487 487
     }
488 488
 
489
+    /**
490
+     * @param string $name
491
+     * @param string $path
492
+     */
489 493
     protected function releaseApplication($name, $path, $version)
490 494
     {
491 495
         $this->stdout("\n");
@@ -584,6 +588,9 @@  discard block
 block discarded – undo
584 588
         Yii::setAlias('@app', $this->_oldAlias);
585 589
     }
586 590
 
591
+    /**
592
+     * @param string $name
593
+     */
587 594
     protected function packageApplication($name, $version, $packagePath)
588 595
     {
589 596
         FileHelper::createDirectory($packagePath);
@@ -741,6 +748,9 @@  discard block
 block discarded – undo
741 748
     }
742 749
 
743 750
 
751
+    /**
752
+     * @param string[] $what
753
+     */
744 754
     protected function closeChangelogs($what, $version)
745 755
     {
746 756
         $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/'));
@@ -752,6 +762,9 @@  discard block
 block discarded – undo
752 762
         );
753 763
     }
754 764
 
765
+    /**
766
+     * @param string[] $what
767
+     */
755 768
     protected function openChangelogs($what, $version)
756 769
     {
757 770
         $headline = "\n$version under development\n";
@@ -768,6 +781,9 @@  discard block
 block discarded – undo
768 781
         }
769 782
     }
770 783
 
784
+    /**
785
+     * @param string[] $what
786
+     */
771 787
     protected function resortChangelogs($what, $version)
772 788
     {
773 789
         foreach($this->getChangelogs($what) as $file) {
@@ -902,6 +918,9 @@  discard block
 block discarded – undo
902 918
             $frameworkPath . '/BaseYii.php');
903 919
     }
904 920
 
921
+    /**
922
+     * @param string $pattern
923
+     */
905 924
     protected function sed($pattern, $replace, $files)
906 925
     {
907 926
         foreach((array) $files as $file) {
@@ -934,6 +953,9 @@  discard block
 block discarded – undo
934 953
     const MINOR = 'minor';
935 954
     const PATCH = 'patch';
936 955
 
956
+    /**
957
+     * @param string $type
958
+     */
937 959
     protected function getNextVersions(array $versions, $type)
938 960
     {
939 961
         foreach($versions as $k => $v) {
Please login to merge, or discard this patch.