Skip to content

Commit

Permalink
Fix CS warnings in function docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Burke committed Mar 3, 2015
1 parent 5579c2a commit 5f51f3a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 55 deletions.
4 changes: 2 additions & 2 deletions src/Collection/functions.php
Expand Up @@ -16,9 +16,9 @@

if (!function_exists('collection')) {
/**
* Returns a new Cake\Collection\Collection object wrapping the passed argument
* Returns a new Cake\Collection\Collection object wrapping the passed argument.
*
* @param \Traversable|array $items The items from which the collection will be built
* @param \Traversable|array $items The items from which the collection will be built.
* @return \Cake\Collection\Collection
*/
function collection($items)
Expand Down
25 changes: 12 additions & 13 deletions src/Core/functions.php
Expand Up @@ -16,8 +16,8 @@

if (!defined('DS')) {
/**
* Define DS as short form of DIRECTORY_SEPARATOR.
*/
* Define DS as short form of DIRECTORY_SEPARATOR.
*/
define('DS', DIRECTORY_SEPARATOR);

}
Expand All @@ -29,10 +29,10 @@
* @param string|array|object $text Text to wrap through htmlspecialchars. Also works with arrays, and objects.
* Arrays will be mapped and have all their elements escaped. Objects will be string cast if they
* implement a `__toString` method. Otherwise the class name will be used.
* @param bool $double Encode existing html entities
* @param bool $double Encode existing html entities.
* @param string $charset Character set to use when escaping. Defaults to config value in `mb_internal_encoding()`
* or 'UTF-8'
* @return string Wrapped text
* or 'UTF-8'.
* @return string Wrapped text.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#h
*/
function h($text, $double = true, $charset = null)
Expand Down Expand Up @@ -80,7 +80,7 @@ function h($text, $double = true, $charset = null)
* @param string $name The name you want to plugin split.
* @param bool $dotAppend Set to true if you want the plugin to have a '.' appended to it.
* @param string $plugin Optional default plugin to use if no plugin is found. Defaults to null.
* @return array Array with 2 indexes. 0 => plugin name, 1 => class name
* @return array Array with 2 indexes. 0 => plugin name, 1 => class name.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pluginSplit
*/
function pluginSplit($name, $dotAppend = false, $plugin = null)
Expand All @@ -101,10 +101,10 @@ function pluginSplit($name, $dotAppend = false, $plugin = null)
/**
* Split the namespace from the classname.
*
* Commonly used like `list($namespace, $className) = namespaceSplit($class);`
* Commonly used like `list($namespace, $className) = namespaceSplit($class);`.
*
* @param string $class The full class name, ie `Cake\Core\App`
* @return array Array with 2 indexes. 0 => namespace, 1 => classname
* @param string $class The full class name, ie `Cake\Core\App`.
* @return array Array with 2 indexes. 0 => namespace, 1 => classname.
*/
function namespaceSplit($class)
{
Expand All @@ -119,16 +119,15 @@ function namespaceSplit($class)

if (!function_exists('pr')) {
/**
* print_r() convenience function
* print_r() convenience function.
*
* In terminals this will act similar to using print_r() directly, when not run on cli
* print_r() will also wrap <pre> tags around the output of given variable. Similar to debug().
*
* @param mixed $var Variable to print out
* @param mixed $var Variable to print out.
* @return void
* @see debug()
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pr
* @see debug()
*/
function pr($var)
{
Expand All @@ -147,7 +146,7 @@ function pr($var)
* In terminals this will act similar to using json_encode() with JSON_PRETTY_PRINT directly, when not run on cli
* will also wrap <pre> tags around the output of given variable. Similar to pr().
*
* @param mixed $var Variable to print out
* @param mixed $var Variable to print out.
* @return void
* @see pr()
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#pj
Expand Down
80 changes: 40 additions & 40 deletions src/I18n/functions.php
Expand Up @@ -18,9 +18,9 @@
/**
* Returns a translated string if one is found; Otherwise, the submitted message.
*
* @param string $singular Text to translate
* @param mixed $args Array with arguments or multiple arguments in function
* @return mixed translated string
* @param string $singular Text to translate.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__
*/
function __($singular, $args = null)
Expand All @@ -40,11 +40,11 @@ function __($singular, $args = null)
* Returns correct plural form of message identified by $singular and $plural for count $count.
* Some languages have more than one form for plural messages dependent on the count.
*
* @param string $singular Singular text to translate
* @param string $plural Plural text
* @param int $count Count
* @param mixed $args Array with arguments or multiple arguments in function
* @return mixed plural form of translated string
* @param string $singular Singular text to translate.
* @param string $plural Plural text.
* @param int $count Count.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Plural form of translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__n
*/
function __n($singular, $plural, $count, $args = null)
Expand All @@ -66,10 +66,10 @@ function __n($singular, $plural, $count, $args = null)
/**
* Allows you to override the current domain for a single message lookup.
*
* @param string $domain Domain
* @param string $msg String to translate
* @param mixed $args Array with arguments or multiple arguments in function
* @return string translated string
* @param string $domain Domain.
* @param string $msg String to translate.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return string Translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__d
*/
function __d($domain, $msg, $args = null)
Expand All @@ -89,12 +89,12 @@ function __d($domain, $msg, $args = null)
* Returns correct plural form of message identified by $singular and $plural for count $count
* from domain $domain.
*
* @param string $domain Domain
* @param string $singular Singular string to translate
* @param string $plural Plural
* @param int $count Count
* @param mixed $args Array with arguments or multiple arguments in function
* @return string plural form of translated string
* @param string $domain Domain.
* @param string $singular Singular string to translate.
* @param string $plural Plural.
* @param int $count Count.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return string Plural form of translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dn
*/
function __dn($domain, $singular, $plural, $count, $args = null)
Expand All @@ -118,10 +118,10 @@ function __dn($domain, $singular, $plural, $count, $args = null)
* The context is a unique identifier for the translations string that makes it unique
* within the same domain.
*
* @param string $context Context of the text
* @param string $singular Text to translate
* @param mixed $args Array with arguments or multiple arguments in function
* @return mixed translated string
* @param string $context Context of the text.
* @param string $singular Text to translate.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__
*/
function __x($context, $singular, $args = null)
Expand All @@ -143,12 +143,12 @@ function __x($context, $singular, $args = null)
* The context is a unique identifier for the translations string that makes it unique
* within the same domain.
*
* @param string $context Context of the text
* @param string $singular Singular text to translate
* @param string $plural Plural text
* @param int $count Count
* @param mixed $args Array with arguments or multiple arguments in function
* @return mixed plural form of translated string
* @param string $context Context of the text.
* @param string $singular Singular text to translate.
* @param string $plural Plural text.
* @param int $count Count.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Plural form of translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__xn
*/
function __xn($context, $singular, $plural, $count, $args = null)
Expand All @@ -172,11 +172,11 @@ function __xn($context, $singular, $plural, $count, $args = null)
* The context is a unique identifier for the translations string that makes it unique
* within the same domain.
*
* @param string $domain Domain
* @param string $context Context of the text
* @param string $msg String to translate
* @param mixed $args Array with arguments or multiple arguments in function
* @return string translated string
* @param string $domain Domain.
* @param string $context Context of the text.
* @param string $msg String to translate.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return string Translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dx
*/
function __dx($domain, $context, $msg, $args = null)
Expand All @@ -201,13 +201,13 @@ function __dx($domain, $context, $msg, $args = null)
* The context is a unique identifier for the translations string that makes it unique
* within the same domain.
*
* @param string $domain Domain
* @param string $context Context of the text
* @param string $singular Singular text to translate
* @param string $plural Plural text
* @param int $count Count
* @param mixed $args Array with arguments or multiple arguments in function
* @return mixed plural form of translated string
* @param string $domain Domain.
* @param string $context Context of the text.
* @param string $singular Singular text to translate.
* @param string $plural Plural text.
* @param int $count Count.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Plural form of translated string.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__dxn
*/
function __dxn($domain, $context, $singular, $plural, $count, $args = null)
Expand Down

0 comments on commit 5f51f3a

Please sign in to comment.