diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 3df0bf734..b12560e30 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -60,7 +60,7 @@ class ConsoleErrorHandler { )); $code = $exception->getCode(); $code = ($code && is_int($code)) ? $code : 1; - return $this->_stop($code); + $this->_stop($code); } /** @@ -88,7 +88,7 @@ class ConsoleErrorHandler { } if ($log === LOG_ERR) { - return $this->_stop(1); + $this->_stop(1); } } diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index e4ce01f3c..90ee0eb38 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -415,7 +415,7 @@ class Shell extends CakeObject { * @param string $command The command name to run on this shell. If this argument is empty, * and the shell has a `main()` method, that will be called instead. * @param array $argv Array of arguments to run the shell with. This array should be missing the shell name. - * @return void + * @return int|bool * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::runCommand */ public function runCommand($command, $argv) { @@ -469,7 +469,7 @@ class Shell extends CakeObject { * Display the help in the correct format * * @param string $command The command to get help for. - * @return void + * @return int|bool */ protected function _displayHelp($command) { $format = 'text'; @@ -571,7 +571,7 @@ class Shell extends CakeObject { * @param string $prompt Prompt text. * @param string|array $options Array or string of options. * @param string $default Default input value. - * @return Either the default value, or the user-provided input. + * @return string|int the default value, or the user-provided input. */ protected function _getInput($prompt, $options, $default) { if (!is_array($options)) { @@ -726,7 +726,7 @@ class Shell extends CakeObject { * * @param string $title Title of the error * @param string $message An optional error message - * @return void + * @return int * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::error */ public function error($title, $message = null) { diff --git a/lib/Cake/Controller/Component/Acl/DbAcl.php b/lib/Cake/Controller/Component/Acl/DbAcl.php index eb420709c..dbbb30fef 100644 --- a/lib/Cake/Controller/Component/Acl/DbAcl.php +++ b/lib/Cake/Controller/Component/Acl/DbAcl.php @@ -52,7 +52,7 @@ class DbAcl extends CakeObject implements AclInterface { /** * Initializes the containing component and sets the Aro/Aco objects to it. * - * @param AclComponent $component The AclComponent instance. + * @param Component $component The AclComponent instance. * @return void */ public function initialize(Component $component) { diff --git a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index f1ba711cd..86fdac616 100644 --- a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -136,7 +136,7 @@ class DigestAuthenticate extends BasicAuthenticate { /** * Gets the digest headers from the request/environment. * - * @return array Array of digest information. + * @return array|bool|null Array of digest information. */ protected function _getDigest() { $digest = env('PHP_AUTH_DIGEST'); diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 9fe60e683..e21f6e085 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -761,7 +761,7 @@ class AuthComponent extends Component { * * @param CakeRequest $request The request that contains authentication data. * @param CakeResponse $response The response - * @return array User record data, or false, if the user could not be identified. + * @return array|bool User record data, or false, if the user could not be identified. */ public function identify(CakeRequest $request, CakeResponse $response) { if (empty($this->_authenticateObjects)) { diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index af46d5e9e..4332dac81 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -494,7 +494,7 @@ class CookieComponent extends Component { * Decrypts $value using public $type method in Security class * * @param array $values Values to decrypt - * @return string decrypted string + * @return array decrypted string */ protected function _decrypt($values) { $decrypted = array(); @@ -516,7 +516,7 @@ class CookieComponent extends Component { * Decodes and decrypts a single value. * * @param string $value The value to decode & decrypt. - * @return string Decoded value. + * @return string|array Decoded value. */ protected function _decode($value) { $prefix = 'Q2FrZQ==.'; @@ -552,7 +552,7 @@ class CookieComponent extends Component { * Maintains reading backwards compatibility with 1.x CookieComponent::_implode(). * * @param string $string A string containing JSON encoded data, or a bare string. - * @return array Map of key and values + * @return string|array Map of key and values */ protected function _explode($string) { $first = substr($string, 0, 1); diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index 47e91d2b0..4fd96dfb7 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -282,7 +282,7 @@ class EmailComponent extends Component { * If you are rendering a template this variable will be sent to the templates as `$content` * @param string $template Template to use when sending email * @param string $layout Layout to use to enclose email body - * @return bool Success + * @return array Success */ public function send($content = null, $template = null, $layout = null) { $lib = new CakeEmail(); diff --git a/lib/Cake/Event/CakeEvent.php b/lib/Cake/Event/CakeEvent.php index 322fac19d..4a23756ef 100644 --- a/lib/Cake/Event/CakeEvent.php +++ b/lib/Cake/Event/CakeEvent.php @@ -111,7 +111,7 @@ class CakeEvent { /** * Stops the event from being used anymore * - * @return void + * @return bool */ public function stopPropagation() { return $this->_stopped = true; diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index e2d9276e6..e4b74a096 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -166,7 +166,8 @@ class CakeEventManager { */ public function detach($callable, $eventKey = null) { if ($callable instanceof CakeEventListener) { - return $this->_detachSubscriber($callable, $eventKey); + $this->_detachSubscriber($callable, $eventKey); + return ; } if (empty($eventKey)) { foreach (array_keys($this->_listeners) as $eventKey) { diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 740fcccad..1b9b51116 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -432,7 +432,7 @@ class TranslateBehavior extends ModelBehavior { * is disabled. * * @param Model $Model Model using this behavior. - * @return void + * @return bool true. */ protected function _setRuntimeData(Model $Model) { $locale = $this->_getLocale($Model); @@ -465,7 +465,7 @@ class TranslateBehavior extends ModelBehavior { * This solves issues with saveAssociated and validate = first. * * @param Model $Model Model using this behavior. - * @return void + * @return bool true. */ public function afterValidate(Model $Model) { $Model->data[$Model->alias] = array_merge( @@ -481,7 +481,7 @@ class TranslateBehavior extends ModelBehavior { * @param Model $Model Model the callback is called on * @param bool $created Whether or not the save created a record. * @param array $options Options passed from Model::save(). - * @return void + * @return bool true. */ public function afterSave(Model $Model, $created, $options = array()) { if (!isset($this->runtime[$Model->alias]['beforeValidate']) && !isset($this->runtime[$Model->alias]['beforeSave'])) { diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index d137cb222..db10a8762 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -73,7 +73,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener { * * @param string $behavior Behavior name. * @param array $config Configuration options. - * @return void + * @return bool true. * @deprecated 3.0.0 Will be removed in 3.0. Replaced with load(). */ public function attach($behavior, $config = array()) { @@ -97,7 +97,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener { * * @param string $behavior CamelCased name of the behavior to load * @param array $config Behavior configuration parameters - * @return bool True on success, false on failure + * @return bool True on success. * @throws MissingBehaviorException when a behavior could not be found. */ public function load($behavior, $config = array()) { @@ -204,7 +204,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener { * @deprecated 3.0.0 Will be removed in 3.0. Use unload instead. */ public function detach($name) { - return $this->unload($name); + $this->unload($name); } /** diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 9a9e4c1c3..2cf39c356 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -212,7 +212,7 @@ class Sqlite extends DboSource { * @param array $fields The fields to update. * @param array $values The values to set columns to. * @param mixed $conditions array of conditions to use. - * @return array + * @return bool */ public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if (empty($values) && !empty($fields)) { diff --git a/lib/Cake/Model/ModelValidator.php b/lib/Cake/Model/ModelValidator.php index bcf6b9e44..f968e2cff 100644 --- a/lib/Cake/Model/ModelValidator.php +++ b/lib/Cake/Model/ModelValidator.php @@ -234,7 +234,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable { * actually run validation rules over data, not just return the messages. * * @param string $options An optional array of custom options to be made available in the beforeValidate callback - * @return array Array of invalid fields + * @return array|bool Array of invalid fields * @triggers Model.afterValidate $model * @see ModelValidator::validates() */ diff --git a/lib/Cake/Network/Http/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php index 8aacde4ef..1643bcbfd 100644 --- a/lib/Cake/Network/Http/HttpSocket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -760,7 +760,7 @@ class HttpSocket extends CakeSocket { * * @param string|array $uri URI to parse * @param bool|array $base If true use default URI config, otherwise indexed array to set 'scheme', 'host', 'port', etc. - * @return array Parsed URI + * @return array|bool Parsed URI */ protected function _parseUri($uri = null, $base = array()) { $uriBase = array( diff --git a/lib/Cake/Network/Http/HttpSocketResponse.php b/lib/Cake/Network/Http/HttpSocketResponse.php index 3be02126a..69c6da725 100644 --- a/lib/Cake/Network/Http/HttpSocketResponse.php +++ b/lib/Cake/Network/Http/HttpSocketResponse.php @@ -259,7 +259,7 @@ class HttpSocketResponse implements ArrayAccess { * Parses an array based header. * * @param array $header Header as an indexed array (field => value) - * @return array Parsed header + * @return array|bool Parsed header */ protected function _parseHeader($header) { if (is_array($header)) { diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 6c4bed107..06ecf6c65 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -581,10 +581,10 @@ class File { */ public function clearStatCache($all = false) { if ($all === false && version_compare(PHP_VERSION, '5.3.0') >= 0) { - return clearstatcache(true, $this->path); + clearstatcache(true, $this->path); } - return clearstatcache(); + clearstatcache(); } /** diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index 2ee5ad30b..62fef677a 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -323,7 +323,7 @@ class Folder { * Returns true if given $path is a registered stream wrapper. * * @param string $path Path to check - * @return boo true If path is registered stream wrapper. + * @return bool true If path is registered stream wrapper. */ public static function isRegisteredStreamWrapper($path) { if (preg_match('/^[A-Z]+(?=:\/\/)/i', $path, $matches) && diff --git a/lib/Cake/Utility/Sanitize.php b/lib/Cake/Utility/Sanitize.php index 450d061f6..0f8b5e073 100644 --- a/lib/Cake/Utility/Sanitize.php +++ b/lib/Cake/Utility/Sanitize.php @@ -34,9 +34,9 @@ class Sanitize { /** * Removes any non-alphanumeric characters. * - * @param string $string String to sanitize + * @param string|array $string String to sanitize * @param array $allowed An array of additional characters that are not to be removed. - * @return string Sanitized string + * @return string|array Sanitized string */ public static function paranoid($string, $allowed = array()) { $allow = null;