From e7debd869237fa1eab39fc2823f2990b26cfa5c9 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 2 Jun 2014 18:27:11 +0530 Subject: [PATCH] More API docblock CS fixes. --- lib/Cake/Configure/ConfigReaderInterface.php | 2 +- lib/Cake/Configure/IniReader.php | 2 +- lib/Cake/Core/App.php | 14 +++++++------- lib/Cake/Core/CakePlugin.php | 4 ++-- lib/Cake/Core/Configure.php | 13 +++++++------ lib/Cake/Event/CakeEvent.php | 4 +--- lib/Cake/Event/CakeEventManager.php | 10 ++++------ lib/Cake/I18n/Multibyte.php | 13 +++++++------ lib/Cake/Model/CakeSchema.php | 2 +- lib/Cake/Model/ModelValidator.php | 6 +++--- lib/Cake/Routing/Dispatcher.php | 4 ++-- lib/Cake/Routing/DispatcherFilter.php | 4 +--- lib/Cake/Routing/Filter/AssetDispatcher.php | 2 +- lib/Cake/Routing/Route/RedirectRoute.php | 2 +- lib/Cake/Routing/Router.php | 2 +- lib/Cake/bootstrap.php | 2 +- 16 files changed, 41 insertions(+), 45 deletions(-) diff --git a/lib/Cake/Configure/ConfigReaderInterface.php b/lib/Cake/Configure/ConfigReaderInterface.php index e36f05697..8c1677b03 100644 --- a/lib/Cake/Configure/ConfigReaderInterface.php +++ b/lib/Cake/Configure/ConfigReaderInterface.php @@ -26,7 +26,7 @@ interface ConfigReaderInterface { * These sources can either be static resources like files, or dynamic ones like * a database, or other datasource. * - * @param string $key + * @param string $key Key to read. * @return array An array of data to merge into the runtime configuration */ public function read($key); diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 886ab1779..8b4c6fac2 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -181,7 +181,7 @@ class IniReader implements ConfigReaderInterface { /** * Converts a value into the ini equivalent * - * @param mixed $value to export. + * @param mixed $val Value to export. * @return string String value for ini file. */ protected function _value($val) { diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 1d174a007..4df1dc8fb 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -393,7 +393,7 @@ class App { * * `App::core('Cache/Engine'); will return the full path to the cache engines package` * - * @param string $type + * @param string $type Package type. * @return array full path to package * @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::core */ @@ -587,19 +587,19 @@ class App { * Finds classes based on $name or specific file(s) to search. Calling App::import() will * not construct any classes contained in the files. It will only find and require() the file. * - * @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#including-files-with-app-import * @param string|array $type The type of Class if passed as a string, or all params can be passed as - * an single array to $type, + * an single array to $type. * @param string $name Name of the Class or a unique name for the file * @param boolean|array $parent boolean true if Class Parent should be searched, accepts key => value - * array('parent' => $parent, 'file' => $file, 'search' => $search, 'ext' => '$ext'); - * $ext allows setting the extension of the file name - * based on Inflector::underscore($name) . ".$ext"; + * array('parent' => $parent, 'file' => $file, 'search' => $search, 'ext' => '$ext'); + * $ext allows setting the extension of the file name + * based on Inflector::underscore($name) . ".$ext"; * @param array $search paths to search for files, array('path 1', 'path 2', 'path 3'); * @param string $file full name of the file to search for including extension * @param boolean $return Return the loaded file, the file must have a return - * statement in it to work: return $variable; + * statement in it to work: return $variable; * @return boolean true if Class is already in memory or if file is found and loaded, false if not + * @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#including-files-with-app-import */ public static function import($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false) { $ext = null; diff --git a/lib/Cake/Core/CakePlugin.php b/lib/Cake/Core/CakePlugin.php index 3515de8fa..529ae0c62 100644 --- a/lib/Cake/Core/CakePlugin.php +++ b/lib/Cake/Core/CakePlugin.php @@ -115,7 +115,7 @@ class CakePlugin { * The above example will load the bootstrap file for all plugins, but for DebugKit it will only load * the routes file and will not look for any bootstrap script. * - * @param array $options + * @param array $options Options list. See CakePlugin::load() for valid options. * @return void */ public static function loadAll($options = array()) { @@ -206,7 +206,7 @@ class CakePlugin { * Returns true if the plugin $plugin is already loaded * If plugin is null, it will return a list of all loaded plugins * - * @param string $plugin + * @param string $plugin Plugin name to check. * @return mixed boolean true if $plugin is already loaded. * If $plugin is null, returns a list of plugins that have been loaded */ diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php index bc1a3f041..b8319f519 100644 --- a/lib/Cake/Core/Configure.php +++ b/lib/Cake/Core/Configure.php @@ -62,7 +62,7 @@ class Configure { * - Include app/Config/bootstrap.php. * - Setup error/exception handlers. * - * @param boolean $boot + * @param boolean $boot Whether to do bootstrapping. * @return void */ public static function bootstrap($boot = true) { @@ -113,6 +113,7 @@ class Configure { /** * Set app's default configs + * * @return void */ protected static function _appDefaults() { @@ -143,11 +144,11 @@ class Configure { * )); * }}} * - * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::write * @param string|array $config The key to write, can be a dot notation value. * Alternatively can be an array containing key(s) and value(s). * @param mixed $value Value to set for var * @return boolean True if write was successful + * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::write */ public static function write($config, $value = null) { if (!is_array($config)) { @@ -178,9 +179,9 @@ class Configure { * Configure::read('Name.key'); will return only the value of Configure::Name[key] * }}} * - * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::read * @param string $var Variable to obtain. Use '.' to access array elements. * @return mixed value stored in configure, or null. + * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::read */ public static function read($var = null) { if ($var === null) { @@ -211,9 +212,9 @@ class Configure { * Configure::delete('Name.key'); will delete only the Configure::Name[key] * }}} * - * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::delete * @param string $var the var to be deleted * @return void + * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::delete */ public static function delete($var = null) { self::$_values = Hash::remove(self::$_values, $var); @@ -240,7 +241,7 @@ class Configure { /** * Gets the names of the configured reader objects. * - * @param string $name + * @param string $name Name to check. If null returns all configured reader names. * @return array Array of the configured reader objects. */ public static function configured($name = null) { @@ -283,12 +284,12 @@ class Configure { * If using `default` config and no reader has been configured for it yet, * one will be automatically created using PhpReader * - * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::load * @param string $key name of configuration resource to load. * @param string $config Name of the configured reader to use to read the resource identified by $key. * @param boolean $merge if config files should be merged instead of simply overridden * @return boolean False if file not found, true if load successful. * @throws ConfigureException Will throw any exceptions the reader raises. + * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::load */ public static function load($key, $config = 'default', $merge = true) { $reader = self::_getReader($config); diff --git a/lib/Cake/Event/CakeEvent.php b/lib/Cake/Event/CakeEvent.php index cdd737a30..0716e9b0b 100644 --- a/lib/Cake/Event/CakeEvent.php +++ b/lib/Cake/Event/CakeEvent.php @@ -1,7 +1,5 @@ settings = Hash::merge($this->settings, $settings); diff --git a/lib/Cake/Routing/Filter/AssetDispatcher.php b/lib/Cake/Routing/Filter/AssetDispatcher.php index 6e9fb6dbd..3c7b3d701 100644 --- a/lib/Cake/Routing/Filter/AssetDispatcher.php +++ b/lib/Cake/Routing/Filter/AssetDispatcher.php @@ -108,7 +108,7 @@ class AssetDispatcher extends DispatcherFilter { /** * Builds asset file path based off url * - * @param string $url + * @param string $url URL * @return string Absolute path for asset file */ protected function _getAssetFile($url) { diff --git a/lib/Cake/Routing/Route/RedirectRoute.php b/lib/Cake/Routing/Route/RedirectRoute.php index 322d276ed..e6a4c5e63 100644 --- a/lib/Cake/Routing/Route/RedirectRoute.php +++ b/lib/Cake/Routing/Route/RedirectRoute.php @@ -113,7 +113,7 @@ class RedirectRoute extends CakeRoute { * Stop execution of the current script. Wraps exit() making * testing easier. * - * @param integer|string $status see http://php.net/exit for values + * @param integer|string $code See http://php.net/exit for values * @return void */ protected function _stop($code = 0) { diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 27fd10dbc..4e31081c8 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -636,7 +636,7 @@ class Router { /** * Parses a file extension out of a URL, if Router::parseExtensions() is enabled. * - * @param string $url + * @param string $url URL. * @return array Returns an array containing the altered URL and the parsed extension. */ protected static function _parseExtension($url) { diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index e1bd899eb..cf4155d04 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -424,7 +424,7 @@ if (!function_exists('mb_encode_mimeheader')) { * @param string $str The string being encoded * @param string $charset specifies the name of the character set in which str is represented in. * The default value is determined by the current NLS setting (mbstring.language). - * @param string $transfer_encoding specifies the scheme of MIME encoding. + * @param string $transferEncoding specifies the scheme of MIME encoding. * It should be either "B" (Base64) or "Q" (Quoted-Printable). Falls back to "B" if not given. * @param string $linefeed specifies the EOL (end-of-line) marker with which * mb_encode_mimeheader() performs line-folding