Permalink
Browse files

Fixed some API doc in controllers and errors.

  • Loading branch information...
1 parent fbbfbaf commit 3723f7d3961bc5659f589bd22b7f7257c0e70789 @jrbasso jrbasso committed Jul 30, 2011
@@ -97,7 +97,7 @@ public function startup() {
/**
* Override main() for help message hook
*
- * @return voids
+ * @return void
*/
public function main() {
$this->out($this->OptionParser->help());
@@ -426,7 +426,7 @@ public function allow($aro, $aco, $actions = "*", $value = 1) {
*
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
- * @param string $actions Action (defaults to *)
+ * @param string $action Action (defaults to *)
* @return boolean Success
* @link http://book.cakephp.org/view/1248/Assigning-Permissions
*/
@@ -439,7 +439,7 @@ public function deny($aro, $aco, $action = "*") {
*
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
- * @param string $actions Action (defaults to *)
+ * @param string $action Action (defaults to *)
* @return boolean Success
*/
public function inherit($aro, $aco, $action = "*") {
@@ -451,7 +451,7 @@ public function inherit($aro, $aco, $action = "*") {
*
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
- * @param string $actions Action (defaults to *)
+ * @param string $action Action (defaults to *)
* @return boolean Success
* @see allow()
*/
@@ -464,7 +464,7 @@ public function grant($aro, $aco, $action = "*") {
*
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
- * @param string $actions Action (defaults to *)
+ * @param string $action Action (defaults to *)
* @return boolean Success
* @see deny()
*/
@@ -337,9 +337,7 @@ public function startup($controller) {
* Attempts to introspect the correct values for object properties including
* $userModel and $sessionKey.
*
- * @param object $controller A reference to the instantiating controller object
* @return boolean
- * @access private
*/
function __setDefaults() {
$defaults = array(
@@ -520,9 +518,8 @@ public function login($user = null) {
* custom logout logic. AuthComponent will remove the session data, so
* there is no need to do that in an authentication object.
*
- * @param mixed $url Optional URL to redirect the user to after logout
- * @return string AuthComponent::$loginAction
- * @see AuthComponent::$loginAction
+ * @return string AuthComponent::$logoutRedirect
+ * @see AuthComponent::$logoutRedirect
* @link http://book.cakephp.org/view/1262/logout
*/
public function logout() {
@@ -615,6 +612,7 @@ public function redirect($url = null) {
* by credentials contained in $request.
*
* @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.
*/
public function identify(CakeRequest $request, CakeResponse $response) {
@@ -676,7 +674,8 @@ public static function password($password) {
/**
* Component shutdown. If user is logged in, wipe out redirect.
*
- * @param object $controller Instantiating controller
+ * @param Controller $controller Instantiating controller
+ * @return void
*/
public function shutdown($controller) {
if ($this->loggedIn()) {
@@ -121,6 +121,7 @@ public function error() {
* @param string $element Element to wrap flash message in.
* @param array $params Parameters to be sent to layout as view variables
* @param string $key Message key, default is 'flash'
+ * @return void
* @link http://book.cakephp.org/view/1313/setFlash
*/
public function setFlash($message, $element = 'default', $params = array(), $key = 'flash') {
@@ -167,7 +168,7 @@ public function destroy() {
* If $id is passed in a beforeFilter, the Session will be started
* with the specified id
*
- * @param $id string
+ * @param string $id
* @return string
*/
public function id($id = null) {
@@ -285,8 +285,9 @@ protected function _scaffoldSave(CakeRequest $request, $action = 'edit') {
/**
* Performs a delete on given scaffolded Model.
*
- * @param array $params Parameters for scaffolding
+ * @param CareRequest $request Request for scaffolding
* @return mixed Success on delete, error if delete fails
+ * @throws NotFoundException
*/
protected function _scaffoldDelete(CakeRequest $request) {
if ($this->controller->_beforeScaffold('delete')) {
@@ -57,7 +57,6 @@ class ExceptionRenderer {
* Controller instance.
*
* @var Controller
- * @access public
*/
public $controller = null;
@@ -87,8 +86,7 @@ class ExceptionRenderer {
* If the error is a CakeException it will be converted to either a 400 or a 500
* code error depending on the code used to construct the error.
*
- * @param string $method Method producing the error
- * @param array $messages Error messages
+ * @param Exception $exception Exception
*/
public function __construct(Exception $exception) {
$this->controller = $this->_getController($exception);
@@ -197,7 +195,8 @@ protected function _cakeError(CakeException $error) {
/**
* Convenience method to display a 400 series page.
*
- * @param array $params Parameters for controller
+ * @param Exception $error
+ * @return void
*/
public function error400($error) {
$message = $error->getMessage();
@@ -217,7 +216,8 @@ public function error400($error) {
/**
* Convenience method to display a 500 page.
*
- * @param array $params Parameters for controller
+ * @param Exception $error
+ * @return void
*/
public function error500($error) {
$url = $this->controller->request->here();
@@ -235,6 +235,7 @@ public function error500($error) {
* Generate the response using the controller object.
*
* @param string $template The template to render.
+ * @return void
*/
protected function _outputMessage($template) {
$this->controller->render($template);
@@ -247,6 +248,7 @@ protected function _outputMessage($template) {
* and doesn't call component methods.
*
* @param string $template The template to render
+ * @return void
*/
protected function _outputMessageSafe($template) {
$this->controller->helpers = array('Form', 'Html', 'Session');

0 comments on commit 3723f7d

Please sign in to comment.