From f7f3515135745b86911b227347d7adb6c350fe49 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 21 Aug 2011 21:45:34 -0400 Subject: [PATCH] Fixed documentation to methods that use func_get_args(). --- lib/Cake/Controller/Component/AuthComponent.php | 12 ++++-------- lib/Cake/Model/Model.php | 4 ++-- lib/Cake/Network/CakeRequest.php | 3 +-- lib/Cake/Utility/Sanitize.php | 6 ++---- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index c5aae6c08b2..8bd4dd4d5d2 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -427,13 +427,11 @@ public function constructAuthorize() { * * `$this->Auth->allow('*');` * - * @param mixed $action Controller action name or array of actions - * @param string $action Controller action name - * @param string ... etc. + * @param mixed $action,... Controller action name or array of actions * @return void * @link http://book.cakephp.org/view/1257/allow */ - public function allow() { + public function allow($action) { $args = func_get_args(); if (empty($args) || $args == array('*')) { $this->allowedActions = $this->_methods; @@ -453,14 +451,12 @@ public function allow() { * `$this->Auth->deny(array('edit', 'add'));` or * `$this->Auth->deny('edit', 'add');` * - * @param mixed $action Controller action name or array of actions - * @param string $action Controller action name - * @param string ... etc. + * @param mixed $action,... Controller action name or array of actions * @return void * @see AuthComponent::allow() * @link http://book.cakephp.org/view/1258/deny */ - public function deny() { + public function deny($action) { $args = func_get_args(); if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 43955a3d427..63e8f6c8137 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2831,11 +2831,11 @@ public function isUnique($fields, $or = true) { /** * Returns a resultset for a given SQL statement. Custom SQL queries should be performed with this method. * - * @param string $sql SQL statement + * @param string $sql,... SQL statement * @return array Resultset * @link http://book.cakephp.org/view/1027/query */ - public function query() { + public function query($sql) { $params = func_get_args(); $db = $this->getDataSource(); return call_user_func_array(array(&$db, 'query'), $params); diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index fcc967149b2..b81651ee759 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -667,8 +667,7 @@ public static function acceptLanguage($language = null) { * You can write to any value, even paths/keys that do not exist, and the arrays * will be created for you. * - * @param string $name Dot separated name of the value to read/write - * @param mixed $value Value to write to the data array. + * @param string $name,... Dot separated name of the value to read/write * @return mixed Either the value being read, or this so you can chain consecutive writes. */ public function data($name) { diff --git a/lib/Cake/Utility/Sanitize.php b/lib/Cake/Utility/Sanitize.php index 1c546a2a232..90689850c12 100644 --- a/lib/Cake/Utility/Sanitize.php +++ b/lib/Cake/Utility/Sanitize.php @@ -169,13 +169,11 @@ public static function stripAll($str) { * * Will remove all ``, `

`, and `

` tags from the $dirty string. * - * @param string $str String to sanitize - * @param string $tag Tag to remove (add more parameters as needed) + * @param string $str,... String to sanitize * @return string sanitized String */ - public static function stripTags() { + public static function stripTags($str) { $params = func_get_args(); - $str = $params[0]; for ($i = 1, $count = count($params); $i < $count; $i++) { $str = preg_replace('/<' . $params[$i] . '\b[^>]*>/i', '', $str);