Browse Source

Cleanup - More PHPDoc mismatches

ndm2 11 years ago
parent
commit
9ff9d9d03d

+ 4 - 4
src/Console/Shell.php

@@ -132,7 +132,7 @@ class Shell {
 /**
  * Normalized map of tasks.
  *
- * @var string
+ * @var array
  */
 	protected $_taskMap = [];
 
@@ -511,7 +511,7 @@ class Shell {
  * @return void
  */
 	public function err($message = null, $newlines = 1) {
-		return $this->_io->err($message, $newlines);
+		$this->_io->err($message, $newlines);
 	}
 
 /**
@@ -534,7 +534,7 @@ class Shell {
  * @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 @@ class Shell {
 		if (!empty($message)) {
 			$this->_io->err($message);
 		}
-		return $this->_stop(1);
+		$this->_stop(1);
 	}
 
 /**

+ 1 - 1
src/Network/Email/SmtpTransport.php

@@ -392,7 +392,7 @@ class SmtpTransport extends AbstractTransport {
  *
  * @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') {

+ 3 - 3
src/Network/Request.php

@@ -289,8 +289,8 @@ class Request implements \ArrayAccess {
 /**
  * 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 @@ class Request implements \ArrayAccess {
  * @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) {

+ 1 - 1
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();
 

+ 2 - 2
src/Network/Session/CacheSession.php

@@ -104,10 +104,10 @@ class CacheSession implements SessionHandlerInterface {
  * 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);
 	}
 
 }

+ 1 - 1
src/ORM/BehaviorRegistry.php

@@ -126,7 +126,7 @@ class BehaviorRegistry extends ObjectRegistry {
  * @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) {

+ 2 - 2
src/Routing/RouteBuilder.php

@@ -437,14 +437,14 @@ class RouteBuilder {
  * @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);
 	}
 
 /**

+ 1 - 1
src/Routing/RouteCollection.php

@@ -136,7 +136,7 @@ class RouteCollection {
  * 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;

+ 2 - 2
src/Routing/Router.php

@@ -204,7 +204,7 @@ class Router {
  * @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 @@ class Router {
 		if (is_string($url)) {
 			$url = ['redirect' => $url];
 		}
-		return static::connect($route, $url, $options);
+		static::connect($route, $url, $options);
 	}
 
 /**

+ 2 - 2
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 = [];
 

+ 1 - 1
src/View/Cell.php

@@ -142,7 +142,7 @@ abstract class Cell {
  *
  * @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) {

+ 1 - 1
src/View/JsonView.php

@@ -138,7 +138,7 @@ class JsonView extends View {
 /**
  * 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) {

+ 1 - 1
src/View/XmlView.php

@@ -122,7 +122,7 @@ class XmlView extends View {
 /**
  * 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) {