From 9b1b4fc5fabfa00ec888ffee06ae00309f9fa2c8 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 30 Jul 2016 00:02:51 +0300 Subject: [PATCH] Added missing phpdoc --- framework/console/controllers/FixtureController.php | 4 ++++ framework/console/controllers/MessageController.php | 3 ++- framework/db/mysql/Schema.php | 1 + framework/validators/DateValidator.php | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index d9c901a80d..16540d6fbb 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -98,6 +98,8 @@ class FixtureController extends Controller * yii fixture/load "*, -User, -UserProfile" * ``` * + * @param array $fixturesInput + * @return int return code * @throws Exception if the specified fixture does not exist. */ public function actionLoad(array $fixturesInput = []) @@ -175,6 +177,8 @@ class FixtureController extends Controller * yii fixture/unload "*, -User, -UserProfile" * ``` * + * @param array $fixturesInput + * @return int return code * @throws Exception if the specified fixture does not exist. */ public function actionUnload(array $fixturesInput = []) diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index 0099455f25..5d2ec1b19a 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -640,6 +640,7 @@ EOD; * @param boolean $sort if translations should be sorted * @param string $category message category * @param boolean $markUnused if obsolete translations should be marked + * @return int exit code */ protected function saveMessagesCategoryToPHP($messages, $fileName, $overwrite, $removeUnused, $sort, $category, $markUnused) { @@ -650,7 +651,7 @@ EOD; ksort($existingMessages); if (array_keys($existingMessages) === $messages && (!$sort || array_keys($rawExistingMessages) === $messages)) { $this->stdout("Nothing new in \"$category\" category... Nothing to save.\n\n", Console::FG_GREEN); - return; + return self::EXIT_CODE_NORMAL; } unset($rawExistingMessages); $merged = []; diff --git a/framework/db/mysql/Schema.php b/framework/db/mysql/Schema.php index 1b67be2cdc..7c94ba13df 100644 --- a/framework/db/mysql/Schema.php +++ b/framework/db/mysql/Schema.php @@ -243,6 +243,7 @@ class Schema extends \yii\db\Schema /** * Collects the foreign key column details for the given table. * @param TableSchema $table the table metadata + * @throws \Exception */ protected function findConstraints($table) { diff --git a/framework/validators/DateValidator.php b/framework/validators/DateValidator.php index 9efcc18dd1..992697458f 100644 --- a/framework/validators/DateValidator.php +++ b/framework/validators/DateValidator.php @@ -346,6 +346,7 @@ class DateValidator extends Validator * @param string $value string representing date * @param string $format the expected date format * @return integer|boolean a UNIX timestamp or `false` on failure. + * @throws InvalidConfigException */ private function parseDateValueIntl($value, $format) {