Docblock and return type fixes

This commit is contained in:
ADmad 2013-07-29 13:35:55 +05:30
parent 7269568ae6
commit a691e70065
4 changed files with 29 additions and 22 deletions

View file

@ -347,7 +347,7 @@ class Controller extends Object implements CakeEventListener {
* 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 @@ class Controller extends Object implements CakeEventListener {
* 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 @@ class Controller extends Object implements CakeEventListener {
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 @@ class Controller extends Object implements CakeEventListener {
*
* @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) {

View file

@ -223,7 +223,7 @@ class Helper extends Object {
*
* @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) {
@ -231,11 +231,13 @@ class Helper extends Object {
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 @@ class Helper extends Object {
* @param string $viewFile The file about to be rendered.
* @return void
*/
public function beforeRenderFile($viewfile) {
public function beforeRenderFile($viewFile) {
}
/**
@ -847,7 +849,7 @@ class Helper extends Object {
* @param string $content The content that was rendered.
* @return void
*/
public function afterRenderFile($viewfile, $content) {
public function afterRenderFile($viewFile, $content) {
}
/**

View file

@ -67,7 +67,8 @@ class CacheHelper extends AppHelper {
* 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()) {

View file

@ -621,7 +621,7 @@ class View extends Object {
* @see ViewBlock::start()
*/
public function start($name) {
return $this->Blocks->start($name);
$this->Blocks->start($name);
}
/**
@ -632,7 +632,7 @@ class View extends Object {
* @see ViewBlock::startIfEmpty()
*/
public function startIfEmpty($name) {
return $this->Blocks->startIfEmpty($name);
$this->Blocks->startIfEmpty($name);
}
/**
@ -646,7 +646,7 @@ class View extends Object {
* @see ViewBlock::concat()
*/
public function append($name, $value = null) {
return $this->Blocks->concat($name, $value);
$this->Blocks->concat($name, $value);
}
/**
@ -660,7 +660,7 @@ class View extends Object {
* @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 @@ class View extends Object {
* @see ViewBlock::set()
*/
public function assign($name, $value) {
return $this->Blocks->set($name, $value);
$this->Blocks->set($name, $value);
}
/**
@ -697,7 +697,7 @@ class View extends Object {
* @see ViewBlock::end()
*/
public function end() {
return $this->Blocks->end();
$this->Blocks->end();
}
/**