Skip to content

Commit

Permalink
More API docblock CS fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 2, 2014
1 parent 3108217 commit e7debd8
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 45 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Configure/ConfigReaderInterface.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Configure/IniReader.php
Expand Up @@ -181,7 +181,7 @@ public function dump($key, $data) {
/**
* 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) {
Expand Down
14 changes: 7 additions & 7 deletions lib/Cake/Core/App.php
Expand Up @@ -393,7 +393,7 @@ public static function themePath($theme) {
*
* `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
*/
Expand Down Expand Up @@ -587,19 +587,19 @@ public static function location($className) {
* 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;
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Core/CakePlugin.php
Expand Up @@ -115,7 +115,7 @@ public static function load($plugin, $config = array()) {
* 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()) {
Expand Down Expand Up @@ -206,7 +206,7 @@ public static function routes($plugin = null) {
* 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
*/
Expand Down
13 changes: 7 additions & 6 deletions lib/Cake/Core/Configure.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -113,6 +113,7 @@ class_exists('String');

/**
* Set app's default configs
*
* @return void
*/
protected static function _appDefaults() {
Expand Down Expand Up @@ -143,11 +144,11 @@ protected static function _appDefaults() {
* ));
* }}}
*
* @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)) {
Expand Down Expand Up @@ -178,9 +179,9 @@ public static function write($config, $value = null) {
* 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) {
Expand Down Expand Up @@ -211,9 +212,9 @@ public static function check($var = null) {
* 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);
Expand All @@ -240,7 +241,7 @@ public static function config($name, ConfigReaderInterface $reader) {
/**
* 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) {
Expand Down Expand Up @@ -283,12 +284,12 @@ public static function drop($name) {
* 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);
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Event/CakeEvent.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -84,7 +82,7 @@ public function __construct($name, $subject = null, $data = null) {
/**
* Dynamically returns the name and subject if accessed directly
*
* @param string $attribute
* @param string $attribute Attribute name.
* @return mixed
*/
public function __get($attribute) {
Expand Down
10 changes: 4 additions & 6 deletions lib/Cake/Event/CakeEventManager.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -64,7 +62,7 @@ class CakeEventManager {
*
* If called with the first parameter, it will be set as the globally available instance
*
* @param CakeEventManager $manager
* @param CakeEventManager $manager Optional event manager instance.
* @return CakeEventManager the global event manager
*/
public static function instance($manager = null) {
Expand Down Expand Up @@ -118,7 +116,7 @@ public function attach($callable, $eventKey = null, $options = array()) {
* Auxiliary function to attach all implemented callbacks of a CakeEventListener class instance
* as individual methods on this manager
*
* @param CakeEventListener $subscriber
* @param CakeEventListener $subscriber Event listener.
* @return void
*/
protected function _attachSubscriber(CakeEventListener $subscriber) {
Expand Down Expand Up @@ -256,7 +254,7 @@ public function dispatch($event) {
/**
* Returns a list of all listeners for an eventKey in the order they should be called
*
* @param string $eventKey
* @param string $eventKey Event key.
* @return array
*/
public function listeners($eventKey) {
Expand Down Expand Up @@ -288,7 +286,7 @@ public function listeners($eventKey) {
/**
* Returns the listeners for the specified event key indexed by priority
*
* @param string $eventKey
* @param string $eventKey Event key.
* @return array
*/
public function prioritisedListeners($eventKey) {
Expand Down
13 changes: 7 additions & 6 deletions lib/Cake/I18n/Multibyte.php
Expand Up @@ -48,7 +48,7 @@ class Multibyte {
* Converts a multibyte character string
* to the decimal value of the character
*
* @param string $string
* @param string $string String to convert.
* @return array
*/
public static function utf8($string) {
Expand Down Expand Up @@ -87,7 +87,7 @@ public static function utf8($string) {
* Converts the decimal value of a multibyte character string
* to a string
*
* @param array $array
* @param array $array Values array.
* @return string
*/
public static function ascii($array) {
Expand Down Expand Up @@ -728,7 +728,7 @@ public static function substr($string, $start, $length = null) {
*
* @param string $string value to encode
* @param string $charset charset to use for encoding. defaults to UTF-8
* @param string $newline
* @param string $newline Newline string.
* @return string
*/
public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
Expand Down Expand Up @@ -774,7 +774,7 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
/**
* Return the Code points range for Unicode characters
*
* @param integer $decimal
* @param integer $decimal Decimal value.
* @return string
*/
protected static function _codepoint($decimal) {
Expand Down Expand Up @@ -823,7 +823,7 @@ protected static function _codepoint($decimal) {
* Find the related code folding values for $char
*
* @param integer $char decimal value of character
* @param string $type
* @param string $type Type 'lower' or 'upper'. Defaults to 'lower'.
* @return array
*/
protected static function _find($char, $type = 'lower') {
Expand Down Expand Up @@ -860,7 +860,8 @@ protected static function _find($char, $type = 'lower') {

/**
* Check the $string for multibyte characters
* @param string $string value to test
*
* @param string $string Value to test.
* @return boolean
*/
public static function checkMultibyte($string) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/CakeSchema.php
Expand Up @@ -599,7 +599,7 @@ protected function _values($values) {
/**
* Formats Schema columns from Model Object
*
* @param array $Obj model object
* @param array &$Obj model object
* @return array Formatted columns
*/
protected function _columns(&$Obj) {
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Model/ModelValidator.php
Expand Up @@ -119,7 +119,7 @@ public function validates($options = array()) {
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be an array indexed by association name.
* @param array &$data Record data to validate. This should be an array indexed by association name.
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return array|boolean If atomic: True on success, or false on failure.
* Otherwise: array similar to the $data array passed, but values are set to true/false
Expand Down Expand Up @@ -196,7 +196,7 @@ public function validateAssociated(&$data, $options = array()) {
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be a numerically-indexed array
* @param array &$data Record data to validate. This should be a numerically-indexed array
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return mixed If atomic: True on success, or false on failure.
* Otherwise: array similar to the $data array passed, but values are set to true/false
Expand Down Expand Up @@ -442,7 +442,7 @@ protected function _validateWithModels($options) {
/**
* Propagates beforeValidate event
*
* @param array $options
* @param array $options Options to pass to callback.
* @return boolean
*/
protected function _triggerBeforeValidate($options = array()) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Routing/Dispatcher.php
Expand Up @@ -85,7 +85,7 @@ public function implementedEvents() {
* Attaches all event listeners for this dispatcher instance. Loads the
* dispatcher filters from the configured locations.
*
* @param CakeEventManager $manager
* @param CakeEventManager $manager Event manager instance.
* @return void
* @throws MissingDispatcherFilterException
*/
Expand Down Expand Up @@ -244,7 +244,7 @@ protected function _getController($request, $response) {
/**
* Load controller and return controller class name
*
* @param CakeRequest $request
* @param CakeRequest $request Request instance.
* @return string|boolean Name of controller class name
*/
protected function _loadController($request) {
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Routing/DispatcherFilter.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -44,7 +42,7 @@ abstract class DispatcherFilter implements CakeEventListener {
/**
* Constructor.
*
* @param string $setting Configuration settings for the filter.
* @param array $settings Configuration settings for the filter.
*/
public function __construct($settings = array()) {
$this->settings = Hash::merge($this->settings, $settings);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Filter/AssetDispatcher.php
Expand Up @@ -108,7 +108,7 @@ protected function _filterAsset(CakeEvent $event) {
/**
* 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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Route/RedirectRoute.php
Expand Up @@ -113,7 +113,7 @@ public function match($url) {
* 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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Router.php
Expand Up @@ -636,7 +636,7 @@ public static function parse($url) {
/**
* 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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/bootstrap.php
Expand Up @@ -424,7 +424,7 @@ function mb_substr($string, $start, $length = null, $encoding = null) {
* @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
Expand Down

0 comments on commit e7debd8

Please sign in to comment.