Skip to content

Commit

Permalink
Fix CS error in I18n, Network, Routing, Utility, View packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Mar 13, 2015
1 parent 0339ad1 commit 82b3caf
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/I18n/I18n.php
Expand Up @@ -207,7 +207,7 @@ public static function config($name, callable $loader)
* locale as stored in the `intl.default_locale` PHP setting.
*
* @param string|null $locale The name of the locale to set as default.
* @return string|null The name of the default locale.
* @return string|void The name of the default locale.
*/
public static function locale($locale = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/I18n/Parser/PoFileParser.php
Expand Up @@ -122,7 +122,7 @@ public function parse($resource)
/**
* Saves a translation item to the messages.
*
* @param array &$messages The messages array being collected from the file
* @param array $messages The messages array being collected from the file
* @param array $item The current item being inspected
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/I18n/TranslatorRegistry.php
Expand Up @@ -130,7 +130,7 @@ protected function _getTranslator($name, $locale)
*
* @param string $name The name of the translator package to register a loader for
* @param callable $loader A callable object that should return a Package
* @return \Aura\Intl\TranslatorInterface A translator object.
* @return void
*/
public function registerLoader($name, callable $loader)
{
Expand Down
12 changes: 6 additions & 6 deletions src/I18n/functions.php
Expand Up @@ -69,7 +69,7 @@ function __n($singular, $plural, $count, $args = null)
* @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.
* @return void|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 @@ -94,7 +94,7 @@ function __d($domain, $msg, $args = null)
* @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.
* @return void|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 @@ -121,7 +121,7 @@ function __dn($domain, $singular, $plural, $count, $args = null)
* @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.
* @return void|string 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 @@ -148,7 +148,7 @@ function __x($context, $singular, $args = null)
* @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.
* @return void|string 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 Down Expand Up @@ -176,7 +176,7 @@ function __xn($context, $singular, $plural, $count, $args = null)
* @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.
* @return void|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 Down Expand Up @@ -207,7 +207,7 @@ function __dx($domain, $context, $msg, $args = null)
* @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.
* @return void|string 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
3 changes: 2 additions & 1 deletion src/Network/Email/Email.php
Expand Up @@ -1995,7 +1995,8 @@ public function serialize()
/**
* Unserializes the Email object.
*
* @return void.
* @param string $data Serialized string.
* @return \Cake\Network\Email\Email Configured email instance.
*/
public function unserialize($data)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Session.php
Expand Up @@ -480,7 +480,7 @@ public function delete($name)
/**
* Used to write new data to _SESSION, since PHP doesn't like us setting the _SESSION var itself.
*
* @param array &$old Set of old variables => values
* @param array $old Set of old variables => values
* @param array $new New set of variable => value
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/RouteBuilder.php
Expand Up @@ -242,7 +242,7 @@ public function params()
* @param array|callable $options Options to use when generating REST routes, or a callback.
* @param callable|null $callback An optional callback to be executed in a nested scope. Nested
* scopes inherit the existing path and 'id' parameter.
* @return array Array of mapped resources
* @return void
*/
public function resources($name, $options = [], $callback = null)
{
Expand Down
12 changes: 8 additions & 4 deletions src/Routing/Router.php
Expand Up @@ -304,18 +304,22 @@ public static function mapResources($controller, $options = [])
if ($plugin && $prefix) {
$path = '/' . implode('/', [$prefix, $pluginUrl]);
$params = ['prefix' => $prefix, 'plugin' => $plugin];
return static::scope($path, $params, $callback);
static::scope($path, $params, $callback);
return;
}

if ($prefix) {
return static::prefix($prefix, $callback);
static::prefix($prefix, $callback);
return;
}

if ($plugin) {
return static::plugin($plugin, $callback);
static::plugin($plugin, $callback);
return;
}

return static::scope('/', $callback);
static::scope('/', $callback);
return;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Utility/Hash.php
Expand Up @@ -486,7 +486,7 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP
* @param array $data Source array from which to extract the data
* @param array $paths An array containing one or more Hash::extract()-style key paths
* @param string $format Format string into which values will be inserted, see sprintf()
* @return array An array of strings extracted from `$path` and formatted with `$format`
* @return void|array An array of strings extracted from `$path` and formatted with `$format`
* @link http://book.cakephp.org/3.0/en/core-libraries/hash.html#Hash::format
* @see sprintf()
* @see Hash::extract()
Expand Down Expand Up @@ -719,7 +719,7 @@ public static function merge(array $data, $merge)
* Merge helper function to reduce duplicated code between merge() and expand().
*
* @param array $stack The stack of operations to work with.
* @param array &$return The return value to operate on.
* @param array $return The return value to operate on.
* @return void
*/
protected static function _merge($stack, &$return)
Expand Down
4 changes: 2 additions & 2 deletions src/Utility/Xml.php
Expand Up @@ -224,7 +224,7 @@ public static function fromArray($input, $options = [])
*
* @param \DOMDocument $dom Handler to DOMDocument
* @param \DOMElement $node Handler to DOMElement (child)
* @param array &$data Array of data to append to the $node.
* @param array $data Array of data to append to the $node.
* @param string $format Either 'attribute' or 'tags'. This determines where nested keys go.
* @return void
* @throws \Cake\Utility\Exception\XmlException
Expand Down Expand Up @@ -356,7 +356,7 @@ public static function toArray($obj)
* Recursive method to toArray
*
* @param \SimpleXMLElement $xml SimpleXMLElement object
* @param array &$parentData Parent array with data
* @param array $parentData Parent array with data
* @param string $ns Namespace of current child
* @param array $namespaces List of namespaces in XML
* @return void
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/FlashHelper.php
Expand Up @@ -60,7 +60,7 @@ class FlashHelper extends Helper
* @param string $key The [Flash.]key you are rendering in the view.
* @param array $options Additional options to use for the creation of this flash message.
* Supports the 'params', and 'element' keys that are used in the helper.
* @return string|null Rendered flash message or null if flash key does not exist
* @return string|void Rendered flash message or null if flash key does not exist
* in session.
* @throws \UnexpectedValueException If value for flash settings key is not an array.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/FormHelper.php
Expand Up @@ -536,7 +536,7 @@ public function end(array $secureAttributes = [])
* generating the hash, else $this->fields is being used.
* @param array $secureAttributes will be passed as HTML attributes into the hidden
* input elements generated for the Security Component.
* @return string A hidden input field with a security hash
* @return void|string A hidden input field with a security hash
*/
public function secure(array $fields = [], array $secureAttributes = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/View/View.php
Expand Up @@ -446,7 +446,7 @@ public function elementExists($name)
*
* @param string|null $view Name of view file to use
* @param string|null $layout Layout to use.
* @return string|null Rendered content or null if content already rendered and returned earlier.
* @return string|void Rendered content or null if content already rendered and returned earlier.
* @throws \Cake\Core\Exception\Exception If there is an error in the view.
* @triggers View.beforeRender $this, [$viewFileName]
* @triggers View.afterRender $this, [$viewFileName]
Expand Down

0 comments on commit 82b3caf

Please sign in to comment.