From 3d9b2b80cb1eaddaf3b6ecf6507906667411a80a Mon Sep 17 00:00:00 2001 From: ADmad Date: Sun, 1 Jun 2014 03:06:05 +0530 Subject: [PATCH] More API docblock fixes. --- lib/Cake/Controller/CakeErrorController.php | 4 +-- .../Controller/Component/AclComponent.php | 4 +-- .../Component/Auth/AbstractPasswordHasher.php | 4 +-- .../Component/Auth/BaseAuthorize.php | 8 +++--- .../Component/Auth/BlowfishPasswordHasher.php | 4 +-- .../Component/Auth/ControllerAuthorize.php | 4 +-- .../Component/Auth/SimplePasswordHasher.php | 4 +-- .../Controller/Component/AuthComponent.php | 4 +-- .../Controller/Component/CookieComponent.php | 4 +-- .../Controller/Component/EmailComponent.php | 2 +- .../Component/RequestHandlerComponent.php | 11 ++++---- lib/Cake/Controller/Controller.php | 24 ++++++++--------- lib/Cake/Log/CakeLog.php | 2 +- lib/Cake/Log/CakeLogInterface.php | 4 +-- lib/Cake/Log/Engine/FileLog.php | 3 ++- lib/Cake/Log/Engine/SyslogLog.php | 6 ++--- .../Model/Validator/CakeValidationRule.php | 10 +++---- .../Model/Validator/CakeValidationSet.php | 15 +++++------ lib/Cake/Network/CakeRequest.php | 8 +++--- lib/Cake/Network/CakeResponse.php | 27 ++++++++++--------- lib/Cake/Network/CakeSocket.php | 4 +-- lib/Cake/Network/Http/BasicAuthentication.php | 12 ++++----- .../Network/Http/DigestAuthentication.php | 12 ++++----- lib/Cake/Network/Http/HttpSocket.php | 8 +++--- lib/Cake/Network/Http/HttpSocketResponse.php | 24 ++++++++--------- 25 files changed, 102 insertions(+), 110 deletions(-) diff --git a/lib/Cake/Controller/CakeErrorController.php b/lib/Cake/Controller/CakeErrorController.php index 8978713c5c0..445e5d6726b 100644 --- a/lib/Cake/Controller/CakeErrorController.php +++ b/lib/Cake/Controller/CakeErrorController.php @@ -39,8 +39,8 @@ class CakeErrorController extends AppController { /** * Constructor * - * @param CakeRequest $request - * @param CakeResponse $response + * @param CakeRequest $request Request instance. + * @param CakeResponse $response Response instance. */ public function __construct($request = null, $response = null) { parent::__construct($request, $response); diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php index fc87b3c6e25..bca1d4f13b4 100644 --- a/lib/Cake/Controller/Component/AclComponent.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -53,8 +53,8 @@ class AclComponent extends Component { /** * Constructor. Will return an instance of the correct ACL class as defined in `Configure::read('Acl.classname')` * - * @param ComponentCollection $collection - * @param array $settings + * @param ComponentCollection $collection Collection instance. + * @param array $settings Settings list. * @throws CakeException when Acl.classname could not be loaded. */ public function __construct(ComponentCollection $collection, $settings = array()) { diff --git a/lib/Cake/Controller/Component/Auth/AbstractPasswordHasher.php b/lib/Cake/Controller/Component/Auth/AbstractPasswordHasher.php index 4173a5ca6c7..19c6c7257ee 100644 --- a/lib/Cake/Controller/Component/Auth/AbstractPasswordHasher.php +++ b/lib/Cake/Controller/Component/Auth/AbstractPasswordHasher.php @@ -1,7 +1,5 @@ Auth->allow('edit', 'add');` or * `$this->Auth->allow();` to allow all actions * - * @param string|array $action,... Controller action name or array of actions + * @param string|array $action Controller action name or array of actions * @return void * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-public */ @@ -537,7 +537,7 @@ public function allow($action = null) { * `$this->Auth->deny('edit', 'add');` or * `$this->Auth->deny();` to remove all items from the allowed list * - * @param string|array $action,... Controller action name or array of actions + * @param string|array $action Controller action name or array of actions * @return void * @see AuthComponent::allow() * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-require-authorization diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index d1aececd278..14f0e5bf716 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -185,7 +185,7 @@ public function __construct(ComponentCollection $collection, $settings = array() /** * Start CookieComponent for use in the controller * - * @param Controller $controller + * @param Controller $controller Controller instance. * @return void */ public function startup(Controller $controller) { @@ -293,7 +293,7 @@ public function read($key = null) { /** * Returns true if given variable is set in cookie. * - * @param string $var Variable name to check for + * @param string $key Variable name to check for * @return boolean True if variable is there */ public function check($key = null) { diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index 2e5ba1c38d6..92ef9a307e2 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -423,7 +423,7 @@ protected function _findFiles($attachment) { /** * Format addresses to be an array with email as key and alias as value * - * @param array $addresses + * @param array $addresses Address to format. * @return array */ protected function _formatAddresses($addresses) { diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 2d1cf590773..6978916eddc 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -224,7 +224,7 @@ public function startup(Controller $controller) { * Helper method to parse xml input data, due to lack of anonymous functions * this lives here. * - * @param string $xml + * @param string $xml XML string. * @return array Xml array data */ public function convertXml($xml) { @@ -246,7 +246,7 @@ public function convertXml($xml) { * @param Controller $controller A reference to the controller * @param string|array $url A string or array containing the redirect location * @param integer|array $status HTTP Status for redirect - * @param boolean $exit + * @param boolean $exit Whether to exit script, defaults to `true`. * @return void */ public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) { @@ -279,7 +279,7 @@ public function beforeRedirect(Controller $controller, $url, $status = null, $ex * render process is skipped. And the client will get a blank response with a * "304 Not Modified" header. * - * @params Controller $controller + * @param Controller $controller Controller instance. * @return boolean false if the render process should be aborted */ public function beforeRender(Controller $controller) { @@ -444,9 +444,10 @@ public function getReferer() { /** * Gets remote client IP * - * @param boolean $safe + * @param boolean $safe Use safe = false when you think the user might manipulate + * their HTTP_CLIENT_IP header. Setting $safe = false will also look at HTTP_X_FORWARDED_FOR * @return string Client IP address - * @deprecated use $this->request->clientIp() from your, controller instead. + * @deprecated use $this->request->clientIp() from your, controller instead. */ public function getClientIP($safe = true) { return $this->request->clientIp($safe); diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index ca311fe86f1..73c0f62aa9d 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -346,7 +346,7 @@ public function __construct($request = null, $response = null) { * Provides backwards compatibility to avoid problems with empty and isset to alias properties. * Lazy loads models using the loadModel() method if declared in $uses * - * @param string $name + * @param string $name Property name to check. * @return boolean */ public function __isset($name) { @@ -412,8 +412,8 @@ public function __get($name) { /** * Provides backwards compatibility access for setting values to the request object. * - * @param string $name - * @param mixed $value + * @param string $name Property name to set. + * @param mixed $value Value to set. * @return void */ public function __set($name, $value) { @@ -448,7 +448,7 @@ public function __set($name, $value) { * - $this->autoRender - To false if $request->params['return'] == 1 * - $this->passedArgs - The the combined results of params['named'] and params['pass] * - * @param CakeRequest $request + * @param CakeRequest $request Request instance. * @return void */ public function setRequest(CakeRequest $request) { @@ -471,7 +471,7 @@ public function setRequest(CakeRequest $request) { * Dispatches the controller action. Checks that the action * exists and isn't private. * - * @param CakeRequest $request + * @param CakeRequest $request Request instance. * @return mixed The resulting response. * @throws PrivateActionException When actions are not public or prefixed by _ * @throws MissingActionException When actions are not defined and scaffolding is @@ -528,7 +528,7 @@ protected function _isPrivateAction(ReflectionMethod $method, CakeRequest $reque /** * Returns a scaffold object to use for dynamically scaffolded controllers. * - * @param CakeRequest $request + * @param CakeRequest $request Request instance. * @return Scaffold */ protected function _getScaffold(CakeRequest $request) { @@ -887,11 +887,11 @@ public function validate() { } /** - * Validates models passed by parameters. Example: + * Validates models passed by parameters. Takes a list of models as a variable argument. + * Example: * * `$errors = $this->validateErrors($this->Article, $this->User);` * - * @param mixed A list of models as a variable argument * @return array Validation errors, or false if none * @deprecated This method will be removed in 3.0 */ @@ -1145,7 +1145,7 @@ public function beforeScaffold($method) { /** * Alias to beforeScaffold() * - * @param string $method + * @param string $method Method name. * @return boolean * @see Controller::beforeScaffold() * @deprecated Will be removed in 3.0. @@ -1168,7 +1168,7 @@ public function afterScaffoldSave($method) { /** * Alias to afterScaffoldSave() * - * @param string $method + * @param string $method Method name. * @return boolean * @see Controller::afterScaffoldSave() * @deprecated Will be removed in 3.0. @@ -1191,7 +1191,7 @@ public function afterScaffoldSaveError($method) { /** * Alias to afterScaffoldSaveError() * - * @param string $method + * @param string $method Method name. * @return boolean * @see Controller::afterScaffoldSaveError() * @deprecated Will be removed in 3.0. @@ -1216,7 +1216,7 @@ public function scaffoldError($method) { /** * Alias to scaffoldError() * - * @param string $method + * @param string $method Method name. * @return boolean * @see Controller::scaffoldError() * @deprecated Will be removed in 3.0. diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index cffbccf1534..a35eda24f11 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -356,9 +356,9 @@ public static function disable($streamName) { /** * Gets the logging engine from the active streams. * - * @see BaseLog * @param string $streamName Key name of a configured stream to get. * @return mixed instance of BaseLog or false if not found + * @see BaseLog */ public static function stream($streamName) { if (empty(self::$_Collection)) { diff --git a/lib/Cake/Log/CakeLogInterface.php b/lib/Cake/Log/CakeLogInterface.php index ca7cfa2d094..6fdb3a903e8 100644 --- a/lib/Cake/Log/CakeLogInterface.php +++ b/lib/Cake/Log/CakeLogInterface.php @@ -27,8 +27,8 @@ interface CakeLogInterface { /** * Write method to handle writes being made to the Logger * - * @param string $type - * @param string $message + * @param string $type Message type. + * @param string $message Message to write. * @return void */ public function write($type, $message); diff --git a/lib/Cake/Log/Engine/FileLog.php b/lib/Cake/Log/Engine/FileLog.php index cd93f54389e..0db4a7f6a12 100644 --- a/lib/Cake/Log/Engine/FileLog.php +++ b/lib/Cake/Log/Engine/FileLog.php @@ -83,7 +83,7 @@ class FileLog extends BaseLog { * - `mask` A mask is applied when log files are created. Left empty no chmod * is made. * - * @param array $options Options for the FileLog, see above. + * @param array $config Options for the FileLog, see above. */ public function __construct($config = array()) { $config = Hash::merge($this->_defaults, $config); @@ -157,6 +157,7 @@ public function write($type, $message) { /** * Get filename + * * @param string $type The type of log. * @return string File name */ diff --git a/lib/Cake/Log/Engine/SyslogLog.php b/lib/Cake/Log/Engine/SyslogLog.php index 51cf1ac9fdb..d6ed83630ab 100644 --- a/lib/Cake/Log/Engine/SyslogLog.php +++ b/lib/Cake/Log/Engine/SyslogLog.php @@ -87,7 +87,7 @@ class SyslogLog extends BaseLog { * Make sure the configuration contains the format parameter, by default it uses * the error number and the type as a prefix to the message * - * @param array $config + * @param array $config Options list. */ public function __construct($config = array()) { $config += $this->_defaults; @@ -142,8 +142,8 @@ protected function _open($ident, $options, $facility) { * Extracts the call to syslog() in order to run unit tests on it. This function * will perform the actual write in the system logger * - * @param integer $priority - * @param string $message + * @param integer $priority Message priority. + * @param string $message Message to log. * @return boolean */ protected function _write($priority, $message) { diff --git a/lib/Cake/Model/Validator/CakeValidationRule.php b/lib/Cake/Model/Validator/CakeValidationRule.php index 0a5d5e5de77..7df11f579a5 100644 --- a/lib/Cake/Model/Validator/CakeValidationRule.php +++ b/lib/Cake/Model/Validator/CakeValidationRule.php @@ -157,7 +157,7 @@ public function isRequired() { * Checks whether the field failed the `field should be present` validation * * @param string $field Field name - * @param array $data Data to check rule against + * @param array &$data Data to check rule against * @return boolean */ public function checkRequired($field, &$data) { @@ -174,7 +174,7 @@ public function checkRequired($field, &$data) { * Checks if the allowEmpty key applies * * @param string $field Field name - * @param array $data data to check rule against + * @param array &$data data to check rule against * @return boolean */ public function checkEmpty($field, &$data) { @@ -259,8 +259,8 @@ public function isUpdate($exists = null) { * Dispatches the validation rule to the given validator method * * @param string $field Field name - * @param array $data Data array - * @param array $methods Methods list + * @param array &$data Data array + * @param array &$methods Methods list * @return boolean True if the rule could be dispatched, false otherwise */ public function process($field, &$data, &$methods) { @@ -334,7 +334,7 @@ protected function _addValidatorProps($validator = array()) { * Parses the rule and sets the rule and ruleParams * * @param string $field Field name - * @param array $data Data array + * @param array &$data Data array * @return void */ protected function _parseRule($field, &$data) { diff --git a/lib/Cake/Model/Validator/CakeValidationSet.php b/lib/Cake/Model/Validator/CakeValidationSet.php index 80b9a79cc22..6daeb8d634c 100644 --- a/lib/Cake/Model/Validator/CakeValidationSet.php +++ b/lib/Cake/Model/Validator/CakeValidationSet.php @@ -74,8 +74,8 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable { /** * Constructor * - * @param string $fieldName The fieldname - * @param array $ruleset + * @param string $fieldName The fieldname. + * @param array $ruleSet Rules set. */ public function __construct($fieldName, $ruleSet) { $this->field = $fieldName; @@ -93,7 +93,7 @@ public function __construct($fieldName, $ruleSet) { /** * Sets the list of methods to use for validation * - * @param array $methods Methods list + * @param array &$methods Methods list * @return void */ public function setMethods(&$methods) { @@ -160,7 +160,7 @@ public function reset() { /** * Gets a rule for a given name if exists * - * @param string $name + * @param string $name Field name. * @return CakeValidationRule */ public function getRule($name) { @@ -330,11 +330,10 @@ public function offsetGet($index) { * This is a wrapper for ArrayAccess. Use setRule() directly for * chainable access. * - * @see http://www.php.net/manual/en/arrayobject.offsetset.php - * - * @param string $index name of the rule - * @param CakeValidationRule|array rule to add to $index + * @param string $index Name of the rule. + * @param CakeValidationRule|array $rule Rule to add to $index. * @return void + * @see http://www.php.net/manual/en/arrayobject.offsetset.php */ public function offsetSet($index, $rule) { $this->setRule($index, $rule); diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 3c15ecbe574..5beca6cc1ec 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -793,7 +793,7 @@ public static function acceptLanguage($language = null) { * Only qualifiers will be extracted, any other accept extensions will be * discarded as they are not frequently used. * - * @param string $header + * @param string $header Header to parse. * @return array */ protected static function _parseAcceptWithQualifier($header) { @@ -854,7 +854,7 @@ public function query($name) { * 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 string $name Dot separated name of the value to read/write, one or more args. * @return mixed Either the value being read, or this so you can chain consecutive writes. */ public function data($name) { @@ -945,11 +945,11 @@ public function allowMethod($methods) { /** * Alias of CakeRequest::allowMethod() for backwards compatibility. * - * @see CakeRequest::allowMethod() - * @deprecated 2.5 Use CakeRequest::allowMethod() instead. * @param string|array $methods Allowed HTTP request methods. * @return boolean true * @throws MethodNotAllowedException + * @see CakeRequest::allowMethod() + * @deprecated 2.5 Use CakeRequest::allowMethod() instead. */ public function onlyAllow($methods) { if (!is_array($methods)) { diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index fd9d6eeedc0..415f196c2c1 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -559,10 +559,10 @@ protected function _sendContent($content) { * e.g `header('WWW-Authenticate: Negotiate'); header('WWW-Authenticate: Not-Negotiate');` * will have the same effect as only doing `header('WWW-Authenticate: Not-Negotiate');` * - * @param string|array $header. An array of header strings or a single header string + * @param string|array $header An array of header strings or a single header string * - an associative array of "header name" => "header value" is also accepted * - an array of string headers is also accepted - * @param string|array $value. The header value(s) + * @param string|array $value The header value(s) * @return array list of headers to be sent */ public function header($header = null, $value = null) { @@ -586,6 +586,7 @@ public function header($header = null, $value = null) { * Acccessor for the location header. * * Get/Set the Location header value. + * * @param null|string $url Either null to get the current location, or a string to set one. * @return string|null When setting the location null will be returned. When reading the location * a string of the current location header value (if any) will be returned. @@ -702,7 +703,7 @@ public function httpCodes($code = null) { * * e.g `type(array('jpg' => 'text/plain'));` * - * @param string $contentType + * @param string $contentType Content type key. * @return mixed current content type or false if supplied an invalid content type */ public function type($contentType = null) { @@ -765,7 +766,7 @@ public function mapType($ctype) { * Sets the response charset * if $charset is null the current charset is returned * - * @param string $charset + * @param string $charset Character set string. * @return string current charset */ public function charset($charset = null) { @@ -892,8 +893,8 @@ public function maxAge($seconds = null) { * with the origin. * If called with no parameters, this function will return whether must-revalidate is present. * - * @param integer $seconds if null, the method will return the current - * must-revalidate value + * @param boolean $enable If null returns whether directive is set, if boolean + * sets or unsets directive. * @return boolean */ public function mustRevalidate($enable = null) { @@ -934,7 +935,7 @@ protected function _setCacheControl() { * `$response->expires(new DateTime('+1 day'))` Will set the expiration in next 24 hours * `$response->expires()` Will return the current expiration header value * - * @param string|DateTime $time + * @param string|DateTime $time Valid time string or DateTime object. * @return string */ public function expires($time = null) { @@ -958,7 +959,7 @@ public function expires($time = null) { * `$response->modified(new DateTime('+1 day'))` Will set the modification date in the past 24 hours * `$response->modified()` Will return the current Last-Modified header value * - * @param string|DateTime $time + * @param string|DateTime $time Valid time string or DateTime object. * @return string */ public function modified($time = null) { @@ -1033,7 +1034,7 @@ public function vary($cacheVariances = null) { * * If no parameters are passed, current Etag header is returned. * - * @param string $hash the unique has that identifies this response + * @param string $tag Tag to set. * @param boolean $weak whether the response is semantically the same as * other with the same hash or not * @return string @@ -1052,7 +1053,7 @@ public function etag($tag = null, $weak = false) { * Returns a DateTime object initialized at the $time param and using UTC * as timezone * - * @param string|integer|DateTime $time + * @param string|DateTime $time Valid time string or unix timestamp or DateTime object. * @return DateTime */ protected function _getUTCDate($time = null) { @@ -1104,7 +1105,7 @@ public function download($filename) { * Sets the protocol to be used when sending the response. Defaults to HTTP/1.1 * If called with no arguments, it will return the current configured protocol * - * @param string protocol to be used for sending response + * @param string $protocol Protocol to be used for sending response. * @return string protocol currently set */ public function protocol($protocol = null) { @@ -1287,8 +1288,8 @@ public function cors(CakeRequest $request, $allowedDomains, $allowedMethods = ar /** * Normalize the origin to regular expressions and put in an array format * - * @param array $domains - * @param boolean $requestIsSSL + * @param array $domains Domains to normalize + * @param boolean $requestIsSSL Whether it's a SSL request. * @return array */ protected function _normalizeCorsDomains($domains, $requestIsSSL = false) { diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index d947a27b4de..be8dadb9ae2 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -182,8 +182,8 @@ public function connect() { * * Instead we need to handle those errors manually. * - * @param integer $code - * @param string $message + * @param integer $code Code. + * @param string $message Message. * @return void */ protected function _connectionErrorHandler($code, $message) { diff --git a/lib/Cake/Network/Http/BasicAuthentication.php b/lib/Cake/Network/Http/BasicAuthentication.php index a9d34f2a30a..05588822508 100644 --- a/lib/Cake/Network/Http/BasicAuthentication.php +++ b/lib/Cake/Network/Http/BasicAuthentication.php @@ -26,8 +26,8 @@ class BasicAuthentication { /** * Authentication * - * @param HttpSocket $http - * @param array $authInfo + * @param HttpSocket $http Http socket instance. + * @param array &$authInfo Authentication info. * @return void * @see http://www.ietf.org/rfc/rfc2617.txt */ @@ -40,8 +40,8 @@ public static function authentication(HttpSocket $http, &$authInfo) { /** * Proxy Authentication * - * @param HttpSocket $http - * @param array $proxyInfo + * @param HttpSocket $http Http socket instance. + * @param array &$proxyInfo Proxy info. * @return void * @see http://www.ietf.org/rfc/rfc2617.txt */ @@ -54,8 +54,8 @@ public static function proxyAuthentication(HttpSocket $http, &$proxyInfo) { /** * Generate basic [proxy] authentication header * - * @param string $user - * @param string $pass + * @param string $user Username. + * @param string $pass Password. * @return string */ protected static function _generateHeader($user, $pass) { diff --git a/lib/Cake/Network/Http/DigestAuthentication.php b/lib/Cake/Network/Http/DigestAuthentication.php index f1c49914c00..aaadbb26198 100644 --- a/lib/Cake/Network/Http/DigestAuthentication.php +++ b/lib/Cake/Network/Http/DigestAuthentication.php @@ -26,8 +26,8 @@ class DigestAuthentication { /** * Authentication * - * @param HttpSocket $http - * @param array $authInfo + * @param HttpSocket $http Http socket instance. + * @param array &$authInfo Authentication info. * @return void * @link http://www.ietf.org/rfc/rfc2617.txt */ @@ -43,8 +43,8 @@ public static function authentication(HttpSocket $http, &$authInfo) { /** * Retrieve information about the authentication * - * @param HttpSocket $http - * @param array $authInfo + * @param HttpSocket $http Http socket instance. + * @param array &$authInfo Authentication info. * @return boolean */ protected static function _getServerInformation(HttpSocket $http, &$authInfo) { @@ -70,8 +70,8 @@ protected static function _getServerInformation(HttpSocket $http, &$authInfo) { /** * Generate the header Authorization * - * @param HttpSocket $http - * @param array $authInfo + * @param HttpSocket $http Http socket instance. + * @param array &$authInfo Authentication info. * @return string */ protected static function _generateHeader(HttpSocket $http, &$authInfo) { diff --git a/lib/Cake/Network/Http/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php index 842ff185b0e..2856af78f45 100644 --- a/lib/Cake/Network/Http/HttpSocket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -543,7 +543,7 @@ public function delete($uri = null, $data = array(), $request = array()) { * * Would return `/search?q=socket`. * - * @param string|array Either a string or array of URL options to create a URL with. + * @param string|array $url Either a string or array of URL options to create a URL with. * @param string $uriTemplate A template string to use for URL formatting. * @return mixed Either false on failure or a string containing the composed URL. */ @@ -910,7 +910,7 @@ protected function _buildRequestLine($request = array(), $versionToken = 'HTTP/1 * Builds the header. * * @param array $header Header to build - * @param string $mode + * @param string $mode Mode * @return string Header built from array */ protected function _buildHeader($header, $mode = 'standard') { @@ -972,7 +972,7 @@ public function buildCookies($cookies) { * Escapes a given $token according to RFC 2616 (HTTP 1.1 specs) * * @param string $token Token to escape - * @param array $chars + * @param array $chars Characters to escape * @return string Escaped token */ protected function _escapeToken($token, $chars = null) { @@ -985,7 +985,7 @@ protected function _escapeToken($token, $chars = null) { * Gets escape chars according to RFC 2616 (HTTP 1.1 specs). * * @param boolean $hex true to get them as HEX values, false otherwise - * @param array $chars + * @param array $chars Characters to escape * @return array Escape chars */ protected function _tokenEscapeChars($hex = true, $chars = null) { diff --git a/lib/Cake/Network/Http/HttpSocketResponse.php b/lib/Cake/Network/Http/HttpSocketResponse.php index 4e62fa34034..d5c0738105d 100644 --- a/lib/Cake/Network/Http/HttpSocketResponse.php +++ b/lib/Cake/Network/Http/HttpSocketResponse.php @@ -82,7 +82,7 @@ class HttpSocketResponse implements ArrayAccess { /** * Constructor * - * @param string $message + * @param string $message Message to parse. */ public function __construct($message = null) { if ($message !== null) { @@ -102,8 +102,8 @@ public function body() { /** * Get header in case insensitive * - * @param string $name Header name - * @param array $headers + * @param string $name Header name. + * @param array $headers Headers to format. * @return mixed String if header exists or null */ public function getHeader($name, $headers = null) { @@ -331,8 +331,8 @@ public function parseCookies($header) { /** * Unescapes a given $token according to RFC 2616 (HTTP 1.1 specs) * - * @param string $token Token to unescape - * @param array $chars + * @param string $token Token to unescape. + * @param array $chars Characters to unescape. * @return string Unescaped token */ protected function _unescapeToken($token, $chars = null) { @@ -344,8 +344,8 @@ protected function _unescapeToken($token, $chars = null) { /** * Gets escape chars according to RFC 2616 (HTTP 1.1 specs). * - * @param boolean $hex true to get them as HEX values, false otherwise - * @param array $chars + * @param boolean $hex True to get them as HEX values, false otherwise. + * @param array $chars Characters to uescape. * @return array Escape chars */ protected function _tokenEscapeChars($hex = true, $chars = null) { @@ -371,7 +371,7 @@ protected function _tokenEscapeChars($hex = true, $chars = null) { /** * ArrayAccess - Offset Exists * - * @param string $offset + * @param string $offset Offset to check. * @return boolean */ public function offsetExists($offset) { @@ -381,7 +381,7 @@ public function offsetExists($offset) { /** * ArrayAccess - Offset Get * - * @param string $offset + * @param string $offset Offset to get. * @return mixed */ public function offsetGet($offset) { @@ -418,8 +418,8 @@ public function offsetGet($offset) { /** * ArrayAccess - Offset Set * - * @param string $offset - * @param mixed $value + * @param string $offset Offset to set. + * @param mixed $value Value. * @return void */ public function offsetSet($offset, $value) { @@ -428,7 +428,7 @@ public function offsetSet($offset, $value) { /** * ArrayAccess - Offset Unset * - * @param string $offset + * @param string $offset Offset to unset. * @return void */ public function offsetUnset($offset) {