diff --git a/src/Console/Shell.php b/src/Console/Shell.php index 9cb9d646356..40e4799e190 100644 --- a/src/Console/Shell.php +++ b/src/Console/Shell.php @@ -132,7 +132,7 @@ class Shell { /** * Normalized map of tasks. * - * @var string + * @var array */ protected $_taskMap = []; @@ -511,7 +511,7 @@ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) { * @return void */ public function err($message = null, $newlines = 1) { - return $this->_io->err($message, $newlines); + $this->_io->err($message, $newlines); } /** @@ -534,7 +534,7 @@ public function nl($multiplier = 1) { * @link http://book.cakephp.org/3.0/en/console-and-shells.html#Shell::hr */ public function hr($newlines = 0, $width = 63) { - return $this->_io->hr($newlines, $width); + $this->_io->hr($newlines, $width); } /** @@ -552,7 +552,7 @@ public function error($title, $message = null) { if (!empty($message)) { $this->_io->err($message); } - return $this->_stop(1); + $this->_stop(1); } /** diff --git a/src/Network/Email/SmtpTransport.php b/src/Network/Email/SmtpTransport.php index 707225b9c45..8827715d6a0 100644 --- a/src/Network/Email/SmtpTransport.php +++ b/src/Network/Email/SmtpTransport.php @@ -392,7 +392,7 @@ protected function _generateSocket() { * * @param string $data data to be sent to SMTP server * @param string|bool $checkCode code to check for in server response, false to skip - * @return void + * @return string|null The matched code, or null if nothing matched * @throws \Cake\Network\Exception\SocketException */ protected function _smtpSend($data, $checkCode = '250') { diff --git a/src/Network/Request.php b/src/Network/Request.php index 674d17a6bad..2484772c9dd 100644 --- a/src/Network/Request.php +++ b/src/Network/Request.php @@ -289,8 +289,8 @@ protected function _processPost($data) { /** * Process the GET parameters and move things into the object. * - * @param array $query Contains querystring data such as `pag` - * @return void + * @param array $query The array to which the parsed keys/values are being added. + * @return array An array containing the parsed querystring keys/values. */ protected function _processGet($query) { $unsetUrl = '/' . str_replace(array('.', ' '), '_', urldecode($this->url)); @@ -440,7 +440,7 @@ protected function _processFiles($post, $files) { * @param string $path The dot separated path to insert $data into. * @param string $field The terminal field in the path. This is one of the * $_FILES properties e.g. name, tmp_name, size, error - * @return void + * @return array The restructured FILES data */ protected function _processFileData($data, $post, $path = '', $field = '') { foreach ($post as $key => $fields) { diff --git a/src/Network/Response.php b/src/Network/Response.php index c680b4f962a..ec1ca0b697a 100644 --- a/src/Network/Response.php +++ b/src/Network/Response.php @@ -364,7 +364,7 @@ class Response { * Holds all the cache directives that will be converted * into headers when sending the request * - * @var string + * @var array */ protected $_cacheDirectives = array(); diff --git a/src/Network/Session/CacheSession.php b/src/Network/Session/CacheSession.php index 4a2fa28497a..7b93eea8568 100644 --- a/src/Network/Session/CacheSession.php +++ b/src/Network/Session/CacheSession.php @@ -104,10 +104,10 @@ public function destroy($id) { * Helper function called on gc for cache sessions. * * @param string $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed. - * @return bool True on success, false on failure. + * @return void */ public function gc($maxlifetime) { - return Cache::gc($this->_options['config'], time() - $maxlifetime); + Cache::gc($this->_options['config'], time() - $maxlifetime); } } diff --git a/src/ORM/BehaviorRegistry.php b/src/ORM/BehaviorRegistry.php index 4c25e949df6..461e9885b92 100644 --- a/src/ORM/BehaviorRegistry.php +++ b/src/ORM/BehaviorRegistry.php @@ -126,7 +126,7 @@ protected function _create($class, $alias, $config) { * @param \Cake\ORM\Behavior $instance The behavior to get methods from. * @param string $class The classname that is missing. * @param string $alias The alias of the object. - * @return void + * @return array A list of implemented finders and methods. * @throws \LogicException when duplicate methods are connected. */ protected function _getMethods(Behavior $instance, $class, $alias) { diff --git a/src/Routing/RouteBuilder.php b/src/Routing/RouteBuilder.php index cd5ace119d2..3de918d88eb 100644 --- a/src/Routing/RouteBuilder.php +++ b/src/Routing/RouteBuilder.php @@ -437,14 +437,14 @@ protected function _makeRoute($route, $defaults, $options) { * @param array $options An array matching the named elements in the route to regular expressions which that * element should match. Also contains additional parameters such as which routed parameters should be * shifted into the passed arguments. As well as supplying patterns for routing parameters. - * @return array Array of routes + * @return void */ public function redirect($route, $url, array $options = []) { $options['routeClass'] = 'Cake\Routing\Route\RedirectRoute'; if (is_string($url)) { $url = array('redirect' => $url); } - return $this->connect($route, $url, $options); + $this->connect($route, $url, $options); } /** diff --git a/src/Routing/RouteCollection.php b/src/Routing/RouteCollection.php index 7fcbba8c33a..83d6aaedb88 100644 --- a/src/Routing/RouteCollection.php +++ b/src/Routing/RouteCollection.php @@ -136,7 +136,7 @@ public function parse($url) { * and newer style urls containing '_name' * * @param array $url The url to match. - * @return string The name of the url + * @return array The set of names of the url */ protected function _getNames($url) { $plugin = false; diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 26674b287d5..3fe5bab5c43 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -204,7 +204,7 @@ public static function connect($route, $defaults = [], $options = []) { * @param array $options An array matching the named elements in the route to regular expressions which that * element should match. Also contains additional parameters such as which routed parameters should be * shifted into the passed arguments. As well as supplying patterns for routing parameters. - * @return array Array of routes + * @return void * @see \Cake\Routing\RouteBuilder::redirect() */ public static function redirect($route, $url, $options = []) { @@ -212,7 +212,7 @@ public static function redirect($route, $url, $options = []) { if (is_string($url)) { $url = ['redirect' => $url]; } - return static::connect($route, $url, $options); + static::connect($route, $url, $options); } /** diff --git a/src/Shell/Task/ExtractTask.php b/src/Shell/Task/ExtractTask.php index cc5fa143713..8b6e95711ed 100644 --- a/src/Shell/Task/ExtractTask.php +++ b/src/Shell/Task/ExtractTask.php @@ -30,7 +30,7 @@ class ExtractTask extends Shell { /** * Paths to use when looking for strings * - * @var string + * @var array */ protected $_paths = []; @@ -58,7 +58,7 @@ class ExtractTask extends Shell { /** * Contains all content waiting to be write * - * @var string + * @var array */ protected $_storage = []; diff --git a/src/View/Cell.php b/src/View/Cell.php index 25220ae163a..8703fd1cfa6 100644 --- a/src/View/Cell.php +++ b/src/View/Cell.php @@ -142,7 +142,7 @@ public function __construct(Request $request = null, Response $response = null, * * @param string $template Custom template name to render. If not provided (null), the last * value will be used. This value is automatically set by `CellTrait::cell()`. - * @return void + * @return string The rendered cell * @throws \Cake\View\Exception\MissingCellViewException When a MissingTemplateException is raised during rendering. */ public function render($template = null) { diff --git a/src/View/JsonView.php b/src/View/JsonView.php index c74c0eb755b..73a8bccbab4 100644 --- a/src/View/JsonView.php +++ b/src/View/JsonView.php @@ -138,7 +138,7 @@ public function render($view = null, $layout = null) { /** * Serialize view vars * - * @param array $serialize The viewVars that need to be serialized + * @param array|string $serialize The viewVars that need to be serialized * @return string The serialized data */ protected function _serialize($serialize) { diff --git a/src/View/XmlView.php b/src/View/XmlView.php index 54dec34d826..9bd1682f25f 100644 --- a/src/View/XmlView.php +++ b/src/View/XmlView.php @@ -122,7 +122,7 @@ public function render($view = null, $layout = null) { /** * Serialize view vars. * - * @param array $serialize The viewVars that need to be serialized. + * @param array|string $serialize The viewVars that need to be serialized. * @return string The serialized data */ protected function _serialize($serialize) {