From 450eefaa50fc8aae1f9137a6fdf7ed2e5e9fe9e1 Mon Sep 17 00:00:00 2001 From: Robert Korulczyk Date: Sat, 12 Nov 2016 22:11:30 +0100 Subject: [PATCH] Some phpdoc fixes from scrutinizer. --- framework/base/ErrorHandler.php | 2 +- framework/console/controllers/CacheController.php | 2 +- framework/i18n/MessageFormatter.php | 4 ++-- framework/web/AssetManager.php | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index ae6a0bfd53..56c1951160 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -196,7 +196,7 @@ abstract class ErrorHandler extends Component * @param string $message the error message. * @param string $file the filename that the error was raised in. * @param int $line the line number the error was raised at. - * @return bool whether the normal error handler continues. + * @return false whether the normal error handler continues. * * @throws ErrorException */ diff --git a/framework/console/controllers/CacheController.php b/framework/console/controllers/CacheController.php index ba791ea3d2..1f393103d7 100644 --- a/framework/console/controllers/CacheController.php +++ b/framework/console/controllers/CacheController.php @@ -71,7 +71,7 @@ class CacheController extends Controller public function actionFlush() { $cachesInput = func_get_args(); - + if (empty($cachesInput)) { throw new Exception('You should specify cache components names'); } diff --git a/framework/i18n/MessageFormatter.php b/framework/i18n/MessageFormatter.php index 425ea82dbd..d591d0d286 100644 --- a/framework/i18n/MessageFormatter.php +++ b/framework/i18n/MessageFormatter.php @@ -79,7 +79,7 @@ class MessageFormatter extends Component * @param string $pattern The pattern string to insert parameters into. * @param array $params The array of name value pairs to insert into the format string. * @param string $language The locale to use for formatting locale-dependent parts - * @return string|bool The formatted pattern string or `FALSE` if an error occurred + * @return string|false The formatted pattern string or `false` if an error occurred */ public function format($pattern, $params, $language) { @@ -259,7 +259,7 @@ class MessageFormatter extends Component * @param string $pattern The pattern string to insert things into. * @param array $args The array of values to insert into the format string * @param string $locale The locale to use for formatting locale-dependent parts - * @return string|bool The formatted pattern string or `FALSE` if an error occurred + * @return false|string The formatted pattern string or `false` if an error occurred */ protected function fallbackFormat($pattern, $args, $locale) { diff --git a/framework/web/AssetManager.php b/framework/web/AssetManager.php index cc5088711b..a5c1488951 100644 --- a/framework/web/AssetManager.php +++ b/framework/web/AssetManager.php @@ -30,7 +30,7 @@ use yii\helpers\Url; * ], * ] * ``` - * + * * For more details and usage information on AssetManager, see the [guide article on assets](guide:structure-assets). * * @property AssetConverterInterface $converter The asset converter. Note that the type of this property @@ -328,7 +328,7 @@ class AssetManager extends Component * Returns the actual file path for the specified asset. * @param AssetBundle $bundle the asset bundle which the asset file belongs to * @param string $asset the asset path. This should be one of the assets listed in [[js]] or [[css]]. - * @return string|bool the actual file path, or false if the asset is specified as an absolute URL + * @return string|false the actual file path, or `false` if the asset is specified as an absolute URL */ public function getAssetPath($bundle, $asset) { @@ -464,7 +464,7 @@ class AssetManager extends Component /** * Publishes a file. * @param string $src the asset file to be published - * @return array the path and the URL that the asset is published as. + * @return string[] the path and the URL that the asset is published as. * @throws InvalidParamException if the asset to be published does not exist. */ protected function publishFile($src) @@ -509,7 +509,7 @@ class AssetManager extends Component * it is found in the target directory. This option is used only when publishing a directory. * This overrides [[forceCopy]] if set. * - * @return array the path directory and the URL that the asset is published as. + * @return string[] the path directory and the URL that the asset is published as. * @throws InvalidParamException if the asset to be published does not exist. */ protected function publishDirectory($src, $options)