Permalink
Browse files

Docblock and return type fixes

  • Loading branch information...
1 parent 7269568 commit a691e70065847ba2cedd6a281c16dfa2c2b31a34 @ADmad ADmad committed Jul 29, 2013
Showing with 29 additions and 22 deletions.
  1. +13 −9 lib/Cake/Controller/Controller.php
  2. +8 −6 lib/Cake/View/Helper.php
  3. +2 −1 lib/Cake/View/Helper/CacheHelper.php
  4. +6 −6 lib/Cake/View/View.php
@@ -347,7 +347,7 @@ public function __construct($request = null, $response = null) {
* Lazy loads models using the loadModel() method if declared in $uses
*
* @param string $name
- * @return void
+ * @return boolean
*/
public function __isset($name) {
switch ($name) {
@@ -384,8 +384,8 @@ public function __isset($name) {
* Provides backwards compatibility access to the request object properties.
* Also provides the params alias.
*
- * @param string $name
- * @return void
+ * @param string $name The name of the requested value
+ * @return mixed The requested value for valid variables/aliases else null
*/
public function __get($name) {
switch ($name) {
@@ -422,15 +422,19 @@ public function __set($name, $value) {
case 'here':
case 'webroot':
case 'data':
- return $this->request->{$name} = $value;
+ $this->request->{$name} = $value;
+ return;
case 'action':
- return $this->request->params['action'] = $value;
+ $this->request->params['action'] = $value;
+ return;
case 'params':
- return $this->request->params = $value;
+ $this->request->params = $value;
+ return;
case 'paginate':
- return $this->Components->load('Paginator')->settings = $value;
+ $this->Components->load('Paginator')->settings = $value;
+ return;
}
- return $this->{$name} = $value;
+ $this->{$name} = $value;
}
/**
@@ -714,7 +718,7 @@ public function httpCodes($code = null) {
*
* @param string $modelClass Name of model class to load
* @param integer|string $id Initial ID the instanced model class should have
- * @return mixed true when single model found and instance created, error returned if model not found.
+ * @return bool True if the model was found
* @throws MissingModelException if the model class cannot be found.
*/
public function loadModel($modelClass = null, $id = null) {
@@ -223,19 +223,21 @@ public function __get($name) {
*
* @param string $name Name of the property being accessed.
* @param mixed $value
- * @return mixed Return the $value
+ * @return void
*/
public function __set($name, $value) {
switch ($name) {
case 'base':
case 'here':
case 'webroot':
case 'data':
- return $this->request->{$name} = $value;
+ $this->request->{$name} = $value;
+ return;
case 'action':
- return $this->request->params['action'] = $value;
+ $this->request->params['action'] = $value;
+ return;
}
- return $this->{$name} = $value;
+ $this->{$name} = $value;
}
/**
@@ -834,7 +836,7 @@ public function afterLayout($layoutFile) {
* @param string $viewFile The file about to be rendered.
* @return void
*/
- public function beforeRenderFile($viewfile) {
+ public function beforeRenderFile($viewFile) {
}
/**
@@ -847,7 +849,7 @@ public function beforeRenderFile($viewfile) {
* @param string $content The content that was rendered.
* @return void
*/
- public function afterRenderFile($viewfile, $content) {
+ public function afterRenderFile($viewFile, $content) {
}
/**
@@ -67,7 +67,8 @@ protected function _enabled() {
* Parses the view file and stores content for cache file building.
*
* @param string $viewFile
- * @return void
+ * @param string $output The output for the file.
+ * @return string Updated content.
*/
public function afterRenderFile($viewFile, $output) {
if ($this->_enabled()) {
@@ -621,7 +621,7 @@ public function blocks() {
* @see ViewBlock::start()
*/
public function start($name) {
- return $this->Blocks->start($name);
+ $this->Blocks->start($name);
}
/**
@@ -632,7 +632,7 @@ public function start($name) {
* @see ViewBlock::startIfEmpty()
*/
public function startIfEmpty($name) {
- return $this->Blocks->startIfEmpty($name);
+ $this->Blocks->startIfEmpty($name);
}
/**
@@ -646,7 +646,7 @@ public function startIfEmpty($name) {
* @see ViewBlock::concat()
*/
public function append($name, $value = null) {
- return $this->Blocks->concat($name, $value);
+ $this->Blocks->concat($name, $value);
}
/**
@@ -660,7 +660,7 @@ public function append($name, $value = null) {
* @see ViewBlock::concat()
*/
public function prepend($name, $value = null) {
- return $this->Blocks->concat($name, $value, ViewBlock::PREPEND);
+ $this->Blocks->concat($name, $value, ViewBlock::PREPEND);
}
/**
@@ -674,7 +674,7 @@ public function prepend($name, $value = null) {
* @see ViewBlock::set()
*/
public function assign($name, $value) {
- return $this->Blocks->set($name, $value);
+ $this->Blocks->set($name, $value);
}
/**
@@ -697,7 +697,7 @@ public function fetch($name, $default = '') {
* @see ViewBlock::end()
*/
public function end() {
- return $this->Blocks->end();
+ $this->Blocks->end();
}
/**

0 comments on commit a691e70

Please sign in to comment.