@@ -224,7 +224,7 @@ |
||
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 | { |
@@ -788,7 +788,7 @@ |
||
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. |
@@ -795,7 +795,7 @@ |
||
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 | */ |
@@ -108,6 +108,9 @@ discard block |
||
108 | 108 | return array_merge(parent::options($actionID), ['updateFiles']); |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param string|null $root |
|
113 | + */ |
|
111 | 114 | protected function findFiles($root) |
112 | 115 | { |
113 | 116 | $except = []; |
@@ -266,6 +269,9 @@ discard block |
||
266 | 269 | } |
267 | 270 | } |
268 | 271 | |
272 | + /** |
|
273 | + * @param string $line |
|
274 | + */ |
|
269 | 275 | protected function fixParamTypes($line) |
270 | 276 | { |
271 | 277 | return preg_replace_callback('~@(param|return) ([\w\\|]+)~i', function($matches) { |
@@ -390,6 +396,10 @@ discard block |
||
390 | 396 | // TODO |
391 | 397 | } |
392 | 398 | |
399 | + /** |
|
400 | + * @param null|string $className |
|
401 | + * @param string $propertyDoc |
|
402 | + */ |
|
393 | 403 | protected function updateClassPropertyDocs($file, $className, $propertyDoc) |
394 | 404 | { |
395 | 405 | $ref = new \ReflectionClass($className); |
@@ -459,7 +469,7 @@ discard block |
||
459 | 469 | /** |
460 | 470 | * remove multi empty lines and trim trailing whitespace |
461 | 471 | * |
462 | - * @param $doc |
|
472 | + * @param string $doc |
|
463 | 473 | * @return string |
464 | 474 | */ |
465 | 475 | protected function cleanDocComment($doc) |
@@ -478,7 +488,7 @@ discard block |
||
478 | 488 | |
479 | 489 | /** |
480 | 490 | * Replace property annotations in doc comment |
481 | - * @param $doc |
|
491 | + * @param string $doc |
|
482 | 492 | * @param $properties |
483 | 493 | * @return string |
484 | 494 | */ |
@@ -640,6 +650,9 @@ discard block |
||
640 | 650 | return [$className, $phpdoc]; |
641 | 651 | } |
642 | 652 | |
653 | + /** |
|
654 | + * @param string $pattern |
|
655 | + */ |
|
643 | 656 | protected function match($pattern, $subject, $split = false) |
644 | 657 | { |
645 | 658 | $sets = []; |
@@ -661,6 +674,9 @@ discard block |
||
661 | 674 | return $sets; |
662 | 675 | } |
663 | 676 | |
677 | + /** |
|
678 | + * @param string $str |
|
679 | + */ |
|
664 | 680 | protected function fixSentence($str) |
665 | 681 | { |
666 | 682 | // TODO fix word wrap |
@@ -669,6 +685,9 @@ discard block |
||
669 | 685 | return strtoupper(substr($str, 0, 1)) . substr($str, 1) . ($str[strlen($str) - 1] != '.' ? '.' : ''); |
670 | 686 | } |
671 | 687 | |
688 | + /** |
|
689 | + * @param string $param |
|
690 | + */ |
|
672 | 691 | protected function getPropParam($prop, $param) |
673 | 692 | { |
674 | 693 | return isset($prop['property']) ? $prop['property'][$param] : (isset($prop['get']) ? $prop['get'][$param] : $prop['set'][$param]); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * Verifies and decrypts data encrypted with [[encryptByPassword()]]. |
135 | 135 | * @param string $data the encrypted data to decrypt |
136 | 136 | * @param string $password the password to use for decryption |
137 | - * @return boolean|string the decrypted data or false on authentication failure |
|
137 | + * @return false|string the decrypted data or false on authentication failure |
|
138 | 138 | * @see encryptByPassword() |
139 | 139 | */ |
140 | 140 | public function decryptByPassword($data, $password) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @param string $data the encrypted data to decrypt |
148 | 148 | * @param string $inputKey the input to use for encryption and authentication |
149 | 149 | * @param string $info optional context and application specific information, see [[hkdf()]] |
150 | - * @return boolean|string the decrypted data or false on authentication failure |
|
150 | + * @return false|string the decrypted data or false on authentication failure |
|
151 | 151 | * @see encryptByKey() |
152 | 152 | */ |
153 | 153 | public function decryptByKey($data, $inputKey, $info = null) |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * @param string $secret the decryption password or key |
215 | 215 | * @param string $info context/application specific information, @see encrypt() |
216 | 216 | * |
217 | - * @return boolean|string the decrypted data or false on authentication failure |
|
217 | + * @return false|string the decrypted data or false on authentication failure |
|
218 | 218 | * @throws InvalidConfigException on OpenSSL not loaded |
219 | 219 | * @throws Exception on OpenSSL error |
220 | 220 | * @see encrypt() |
@@ -186,7 +186,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | { |
@@ -574,7 +574,7 @@ |
||
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) |
@@ -575,7 +575,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | { |