Skip to content

Commit

Permalink
More api docblock fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 15, 2014
1 parent c3824d2 commit c167ee5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 39 deletions.
3 changes: 2 additions & 1 deletion src/Auth/BaseAuthenticate.php
Expand Up @@ -79,10 +79,11 @@ abstract class BaseAuthenticate {
* @var bool
*/
protected $_needsPasswordRehash = false;

/**
* Constructor
*
* @param ComponentRegistry $registry The Component registry used on this request.
* @param \Cake\Controller\ComponentRegistry $registry The Component registry used on this request.
* @param array $config Array of config to use.
*/
public function __construct(ComponentRegistry $registry, $config) {
Expand Down
2 changes: 2 additions & 0 deletions src/Log/LogEngineRegistry.php
Expand Up @@ -47,6 +47,7 @@ protected function _resolveClassName($class) {
*
* @param string $class The classname that is missing.
* @param string $plugin The plugin the logger is missing in.
* @return void
* @throws \Cake\Error\Exception
*/
protected function _throwMissingClassError($class, $plugin) {
Expand All @@ -57,6 +58,7 @@ protected function _throwMissingClassError($class, $plugin) {
* Create the logger instance.
*
* Part of the template method for Cake\Utility\ObjectRegistry::load()
*
* @param string|LogInterface $class The classname or object to make.
* @param string $alias The alias of the object.
* @param array $settings An array of settings to use for the logger.
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Email/Email.php
Expand Up @@ -1150,7 +1150,7 @@ public function message($type = null) {
*
* @param string|array $key The configuration name to read/write. Or
* an array of multiple transports to set.
* @param array|AbstractTransport Either an array of configuration
* @param array|AbstractTransport $config Either an array of configuration
* data, or a transport instance.
* @return mixed Either null when setting or an array of data when reading.
* @throws \Cake\Error\Exception When modifying an existing configuration.
Expand Down
6 changes: 3 additions & 3 deletions src/Network/Http/Adapter/Stream.php
Expand Up @@ -229,7 +229,7 @@ protected function _buildSslContext(Request $request, $options) {
/**
* Open the stream and send the request.
*
* @param Request $request
* @param \Cake\Network\Request $request The request object.
* @return array Array of populated Response objects
* @throws \Cake\Error\Exception
*/
Expand Down Expand Up @@ -274,8 +274,8 @@ protected function _open($url) {
* Local error handler to capture errors triggered during
* stream connection.
*
* @param int $code
* @param string $message
* @param int $code Error code.
* @param string $message Error message.
* @return void
*/
protected function _connectionErrorHandler($code, $message) {
Expand Down
16 changes: 8 additions & 8 deletions src/Network/Http/Auth/Digest.php
Expand Up @@ -34,8 +34,8 @@ class Digest {
/**
* Constructor
*
* @param \Cake\Network\Http\Client $client
* @param array $options
* @param \Cake\Network\Http\Client $client Http client object.
* @param array $options Options list.
*/
public function __construct(Client $client, $options = null) {
$this->_client = $client;
Expand All @@ -44,8 +44,8 @@ public function __construct(Client $client, $options = null) {
/**
* Add Authorization header to the request.
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return void
* @see http://www.ietf.org/rfc/rfc2617.txt
*/
Expand All @@ -70,8 +70,8 @@ public function authentication(Request $request, array $credentials) {
* another request without authentication to get authentication
* challenge.
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return Array modified credentials.
*/
protected function _getServerInfo(Request $request, $credentials) {
Expand Down Expand Up @@ -102,8 +102,8 @@ protected function _getServerInfo(Request $request, $credentials) {
/**
* Generate the header Authorization
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return string
*/
protected function _generateHeader(Request $request, $credentials) {
Expand Down
24 changes: 12 additions & 12 deletions src/Network/Http/Auth/Oauth.php
Expand Up @@ -32,8 +32,8 @@ class Oauth {
/**
* Add headers for Oauth authorization.
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return void
* @throws \Cake\Error\Exception On invalid signature types.
*/
Expand Down Expand Up @@ -74,8 +74,8 @@ public function authentication(Request $request, array $credentials) {
* You should only ever use PLAINTEXT when dealing with SSL
* services.
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return string Authorization header.
*/
protected function _plaintext($request, $credentials) {
Expand All @@ -102,8 +102,8 @@ protected function _plaintext($request, $credentials) {
*
* This method is suitable for plain HTTP or HTTPS.
*
* @param Request $request
* @param array $credentials
* @param \Cake\Network\Request $request The request object.
* @param array $credentials Authentication credentials.
* @return string
*/
protected function _hmacSha1($request, $credentials) {
Expand Down Expand Up @@ -141,8 +141,8 @@ protected function _hmacSha1($request, $credentials) {
* - The request URL (without querystring) is normalized.
* - The HTTP method, URL and request parameters are concatenated and returnned.
*
* @param Request $request
* @param array $oauthValues
* @param \Cake\Network\Request $request The request object.
* @param array $oauthValues Oauth values.
* @return string
*/
public function baseString($request, $oauthValues) {
Expand All @@ -160,7 +160,7 @@ public function baseString($request, $oauthValues) {
*
* Section 9.1.2. of the Oauth spec
*
* @param string $url
* @param string $url URL
* @return string Normalized URL
* @throws \Cake\Error\Exception On invalid URLs
*/
Expand Down Expand Up @@ -192,8 +192,8 @@ protected function _normalizedUrl($url) {
* - URL encode keys + values.
* - Sort keys & values by byte value.
*
* @param Request $request
* @param array $oauthValues
* @param \Cake\Network\Request $request The request object.
* @param array $oauthValues Oauth values.
* @return string sorted and normalized values
*/
protected function _normalizedParams($request, $oauthValues) {
Expand Down Expand Up @@ -244,7 +244,7 @@ protected function _buildAuth($data) {
/**
* URL Encodes a value based on rules of rfc3986
*
* @param string $value
* @param string $value Value to encode.
* @return string
*/
protected function _encode($value) {
Expand Down
1 change: 0 additions & 1 deletion src/Utility/ObjectRegistry.php
Expand Up @@ -231,5 +231,4 @@ public function __debugInfo() {
return $properties;
}


}
5 changes: 2 additions & 3 deletions src/Validation/Validation.php
@@ -1,6 +1,5 @@
<?php
/**
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -107,12 +106,12 @@ public static function lengthBetween($check, $min, $max) {
/**
* Alias of Validator::lengthBetween() for backwards compatibility.
*
* @see Validator::lengthBetween()
* @deprecated Deprecated since 2.6, use Validator::lengthBetween() instead.
* @param string $check Value to check for length
* @param integer $min Minimum value in range (inclusive)
* @param integer $max Maximum value in range (inclusive)
* @return boolean Success
* @see Validator::lengthBetween()
* @deprecated 2.6 Use Validator::lengthBetween() instead.
*/
public static function between($check, $min, $max) {
return self::lengthBetween($check, $min, $max);
Expand Down
8 changes: 2 additions & 6 deletions src/Validation/ValidationSet.php
@@ -1,9 +1,5 @@
<?php
/**
* ValidationSet.
*
* Provides the Model validation logic.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -80,7 +76,7 @@ public function isEmptyAllowed($allowEmpty = null) {
/**
* Gets a rule for a given name if exists
*
* @param string $name
* @param string $name The name under which the rule is set.
* @return \Cake\Validation\ValidationRule
*/
public function rule($name) {
Expand Down Expand Up @@ -164,7 +160,7 @@ public function offsetGet($index) {
* Sets or replace a validation rule
*
* @param string $index name of the rule
* @param \Cake\Validation\ValidationRule|array rule to add to $index
* @param \Cake\Validation\ValidationRule|array $rule Rule to add to $index
* @return void
*/
public function offsetSet($index, $rule) {
Expand Down
8 changes: 4 additions & 4 deletions src/Validation/Validator.php
Expand Up @@ -145,8 +145,8 @@ public function hasField($name) {
* If called with no arguments, it will return the provider stored under that name if
* it exists, otherwise it returns this instance of chaining.
*
* @param string $name
* @param null|object|string $object
* @param string $name The name under which the provider should be set.
* @param null|object|string $object Provider object or class name.
* @return Validator|object|string
*/
public function provider($name, $object = null) {
Expand Down Expand Up @@ -358,7 +358,7 @@ public function notEmpty($field, $message = null, $mode = false) {
* Returns whether or not a field can be left empty for a new or already existing
* record.
*
* @param string $field
* @param string $field Field name.
* @param bool $newRecord whether the data to be validated is new or to be updated.
* @return bool
*/
Expand All @@ -370,7 +370,7 @@ public function isEmptyAllowed($field, $newRecord) {
* Returns whether or not a field can be left out for a new or already existing
* record.
*
* @param string $field
* @param string $field Field name.
* @param bool $newRecord whether the data to be validated is new or to be updated.
* @return bool
*/
Expand Down

0 comments on commit c167ee5

Please sign in to comment.