@@ -114,6 +114,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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]); |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | /** |
339 | 339 | * @param array $what list of items |
340 | - * @param array $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
340 | + * @param string[] $limit list of things to allow, or empty to allow any, can be `app`, `framework`, `extension` |
|
341 | 341 | * @throws \yii\base\Exception |
342 | 342 | */ |
343 | 343 | protected function validateWhat(array $what, $limit = []) |
@@ -503,6 +503,10 @@ discard block |
||
503 | 503 | |
504 | 504 | } |
505 | 505 | |
506 | + /** |
|
507 | + * @param string $name |
|
508 | + * @param string $path |
|
509 | + */ |
|
506 | 510 | protected function releaseApplication($name, $path, $version) |
507 | 511 | { |
508 | 512 | $this->stdout("\n"); |
@@ -603,6 +607,9 @@ discard block |
||
603 | 607 | Yii::setAlias('@app', $this->_oldAlias); |
604 | 608 | } |
605 | 609 | |
610 | + /** |
|
611 | + * @param string $name |
|
612 | + */ |
|
606 | 613 | protected function packageApplication($name, $version, $packagePath) |
607 | 614 | { |
608 | 615 | FileHelper::createDirectory($packagePath); |
@@ -762,6 +769,9 @@ discard block |
||
762 | 769 | } |
763 | 770 | |
764 | 771 | |
772 | + /** |
|
773 | + * @param string[] $what |
|
774 | + */ |
|
765 | 775 | protected function closeChangelogs($what, $version) |
766 | 776 | { |
767 | 777 | $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); |
@@ -773,6 +783,9 @@ discard block |
||
773 | 783 | ); |
774 | 784 | } |
775 | 785 | |
786 | + /** |
|
787 | + * @param string[] $what |
|
788 | + */ |
|
776 | 789 | protected function openChangelogs($what, $version) |
777 | 790 | { |
778 | 791 | $headline = "\n$version under development\n"; |
@@ -789,6 +802,9 @@ discard block |
||
789 | 802 | } |
790 | 803 | } |
791 | 804 | |
805 | + /** |
|
806 | + * @param string[] $what |
|
807 | + */ |
|
792 | 808 | protected function resortChangelogs($what, $version) |
793 | 809 | { |
794 | 810 | foreach($this->getChangelogs($what) as $file) { |
@@ -923,6 +939,9 @@ discard block |
||
923 | 939 | $frameworkPath . '/BaseYii.php'); |
924 | 940 | } |
925 | 941 | |
942 | + /** |
|
943 | + * @param string $pattern |
|
944 | + */ |
|
926 | 945 | protected function sed($pattern, $replace, $files) |
927 | 946 | { |
928 | 947 | foreach((array) $files as $file) { |
@@ -955,6 +974,9 @@ discard block |
||
955 | 974 | const MINOR = 'minor'; |
956 | 975 | const PATCH = 'patch'; |
957 | 976 | |
977 | + /** |
|
978 | + * @param string $type |
|
979 | + */ |
|
958 | 980 | protected function getNextVersions(array $versions, $type) |
959 | 981 | { |
960 | 982 | foreach($versions as $k => $v) { |
@@ -129,7 +129,7 @@ |
||
129 | 129 | * This method is called by [[evaluateAttributes()]]. Its return value will be assigned |
130 | 130 | * to the attributes corresponding to the triggering event. |
131 | 131 | * @param Event $event the event that triggers the current attribute updating. |
132 | - * @return mixed the attribute value |
|
132 | + * @return string the attribute value |
|
133 | 133 | */ |
134 | 134 | protected function getValue($event) |
135 | 135 | { |
@@ -144,7 +144,7 @@ |
||
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 | { |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | * |
271 | 271 | * @param string $message to echo out before waiting for user input |
272 | 272 | * @param boolean $default this value is returned if no selection is made. |
273 | - * @return boolean whether user confirmed. |
|
273 | + * @return boolean|null whether user confirmed. |
|
274 | 274 | * Will return true if [[interactive]] is false. |
275 | 275 | */ |
276 | 276 | public function confirm($message, $default = false) |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * until [[beforeAction()]] is being called. |
307 | 307 | * |
308 | 308 | * @param string $actionID the action id of the current request |
309 | - * @return array the names of the options valid for the action |
|
309 | + * @return string[] the names of the options valid for the action |
|
310 | 310 | */ |
311 | 311 | public function options($actionID) |
312 | 312 | { |
@@ -231,7 +231,7 @@ |
||
231 | 231 | /** |
232 | 232 | * Prompts user with confirmation if caches should be flushed. |
233 | 233 | * @param array $cachesNames |
234 | - * @return boolean |
|
234 | + * @return boolean|null |
|
235 | 235 | */ |
236 | 236 | private function confirmFlush($cachesNames) |
237 | 237 | { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | * Prompts user with confirmation if fixtures should be loaded. |
311 | 311 | * @param array $fixtures |
312 | 312 | * @param array $except |
313 | - * @return boolean |
|
313 | + * @return boolean|null |
|
314 | 314 | */ |
315 | 315 | private function confirmLoad($fixtures, $except) |
316 | 316 | { |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * Prompts user with confirmation for fixtures that should be unloaded. |
343 | 343 | * @param array $fixtures |
344 | 344 | * @param array $except |
345 | - * @return boolean |
|
345 | + * @return boolean|null |
|
346 | 346 | */ |
347 | 347 | private function confirmUnload($fixtures, $except) |
348 | 348 | { |
@@ -594,7 +594,7 @@ |
||
594 | 594 | * Finds out a line of the first non-char PHP token found |
595 | 595 | * |
596 | 596 | * @param array $tokens |
597 | - * @return integer|string |
|
597 | + * @return string |
|
598 | 598 | * @since 2.0.1 |
599 | 599 | */ |
600 | 600 | protected function getLine($tokens) |
@@ -392,7 +392,7 @@ |
||
392 | 392 | * @param boolean|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 |