diff --git a/src/Cache/CacheEngine.php b/src/Cache/CacheEngine.php index 3f350f49ec7..0560af55afb 100644 --- a/src/Cache/CacheEngine.php +++ b/src/Cache/CacheEngine.php @@ -148,7 +148,7 @@ abstract public function clear($check); * to decide whether actually delete the keys or just simulate it to achieve * the same result. * - * @param string $groups name of the group to be cleared + * @param string $group name of the group to be cleared * @return boolean */ public function clearGroup($group) { diff --git a/src/Collection/CollectionTrait.php b/src/Collection/CollectionTrait.php index 20b3a709f23..d446e5a63a8 100644 --- a/src/Collection/CollectionTrait.php +++ b/src/Collection/CollectionTrait.php @@ -665,7 +665,7 @@ public function append($items) { * or a function returning the indexing key out of the provided element * @param callable|string $valuePath the column name path to use as the array value * or a function returning the value out of the provided element - * @param callable|string $valuePath the column name path to use as the parent + * @param callable|string $groupPath the column name path to use as the parent * grouping key or a function returning the key out of the provided element * @return \Cake\Collection\Collection */ diff --git a/src/Collection/Iterator/SortIterator.php b/src/Collection/Iterator/SortIterator.php index 4572f7e85e8..678f523c75c 100644 --- a/src/Collection/Iterator/SortIterator.php +++ b/src/Collection/Iterator/SortIterator.php @@ -87,11 +87,11 @@ class SortIterator extends SplHeap { * @param integer $type the type of comparison to perform, either SORT_STRING * SORT_NUMERIC or SORT_NATURAL */ - public function __construct($items, $c, $dir = SORT_DESC, $type = SORT_NUMERIC) { + public function __construct($items, $callback, $dir = SORT_DESC, $type = SORT_NUMERIC) { $this->_items = $items; $this->_dir = $dir; $this->_type = $type; - $this->_callback = $this->_propertyExtractor($c); + $this->_callback = $this->_propertyExtractor($callback); } /** diff --git a/src/Configure/Engine/IniConfig.php b/src/Configure/Engine/IniConfig.php index 7c6d488dc3c..d4680dd7aa2 100644 --- a/src/Configure/Engine/IniConfig.php +++ b/src/Configure/Engine/IniConfig.php @@ -186,17 +186,17 @@ public function dump($key, $data) { * @param mixed $value to export. * @return string String value for ini file. */ - protected function _value($val) { - if ($val === null) { + protected function _value($value) { + if ($value === null) { return 'null'; } - if ($val === true) { + if ($value === true) { return 'true'; } - if ($val === false) { + if ($value === false) { return 'false'; } - return (string)$val; + return (string)$value; } /** diff --git a/src/Console/ConsoleInputArgument.php b/src/Console/ConsoleInputArgument.php index 4760a031faa..a4fb64827c5 100644 --- a/src/Console/ConsoleInputArgument.php +++ b/src/Console/ConsoleInputArgument.php @@ -154,8 +154,8 @@ public function validChoice($value) { /** * Append this arguments XML representation to the passed in SimpleXml object. * - * @param SimpleXmlElement $parent The parent element. - * @return SimpleXmlElement The parent with this argument appended. + * @param \SimpleXmlElement $parent The parent element. + * @return \SimpleXmlElement The parent with this argument appended. */ public function xml(\SimpleXmlElement $parent) { $option = $parent->addChild('argument'); diff --git a/src/Console/ConsoleInputOption.php b/src/Console/ConsoleInputOption.php index 8d4da6894f6..a3fff7262f0 100644 --- a/src/Console/ConsoleInputOption.php +++ b/src/Console/ConsoleInputOption.php @@ -199,8 +199,8 @@ public function validChoice($value) { /** * Append the option's xml into the parent. * - * @param SimpleXmlElement $parent The parent element. - * @return SimpleXmlElement The parent with this option appended. + * @param \SimpleXmlElement $parent The parent element. + * @return \SimpleXmlElement The parent with this option appended. */ public function xml(\SimpleXmlElement $parent) { $option = $parent->addChild('option'); diff --git a/src/Console/ConsoleInputSubcommand.php b/src/Console/ConsoleInputSubcommand.php index 3d869937756..172be92c5cc 100644 --- a/src/Console/ConsoleInputSubcommand.php +++ b/src/Console/ConsoleInputSubcommand.php @@ -107,8 +107,8 @@ public function parser() { /** * Append this subcommand to the Parent element * - * @param SimpleXmlElement $parent The parent element. - * @return SimpleXmlElement The parent with this subcommand appended. + * @param \SimpleXmlElement $parent The parent element. + * @return \SimpleXmlElement The parent with this subcommand appended. */ public function xml(\SimpleXmlElement $parent) { $command = $parent->addChild('command'); diff --git a/src/Controller/Component/Acl/AclInterface.php b/src/Controller/Component/Acl/AclInterface.php index 027bab6e2f5..acf6464e32f 100644 --- a/src/Controller/Component/Acl/AclInterface.php +++ b/src/Controller/Component/Acl/AclInterface.php @@ -66,7 +66,7 @@ public function inherit($aro, $aco, $action = "*"); /** * Initialization method for the Acl implementation * - * @param AclComponent $component + * @param Component $component * @return void */ public function initialize(Component $component); diff --git a/src/Controller/Component/Acl/IniAcl.php b/src/Controller/Component/Acl/IniAcl.php index 9711a927cb4..489e40de188 100644 --- a/src/Controller/Component/Acl/IniAcl.php +++ b/src/Controller/Component/Acl/IniAcl.php @@ -45,7 +45,7 @@ class IniAcl extends Object implements AclInterface { /** * Initialize method * - * @param AclBase $component + * @param Component $component * @return void */ public function initialize(Component $component) { diff --git a/src/Controller/Component/Acl/PhpAcl.php b/src/Controller/Component/Acl/PhpAcl.php index 1511e8f0550..9e4d16de30f 100644 --- a/src/Controller/Component/Acl/PhpAcl.php +++ b/src/Controller/Component/Acl/PhpAcl.php @@ -82,7 +82,7 @@ public function __construct() { /** * Initialize method * - * @param AclComponent $Component Component instance + * @param Component $Component Component instance * @return void */ public function initialize(Component $Component) { diff --git a/src/Controller/Component/Auth/BaseAuthorize.php b/src/Controller/Component/Auth/BaseAuthorize.php index efbe37b6fa0..b4cb3e4ec41 100644 --- a/src/Controller/Component/Auth/BaseAuthorize.php +++ b/src/Controller/Component/Auth/BaseAuthorize.php @@ -72,7 +72,7 @@ abstract class BaseAuthorize { * Constructor * * @param ComponentRegistry $registry The controller for this request. - * @param string $settings An array of settings. This class does not use any settings. + * @param array $settings An array of settings. This class does not use any settings. */ public function __construct(ComponentRegistry $registry, $settings = array()) { $this->_registry = $registry; diff --git a/src/Controller/Component/Auth/BasicAuthenticate.php b/src/Controller/Component/Auth/BasicAuthenticate.php index 530003e6692..a04477655f1 100644 --- a/src/Controller/Component/Auth/BasicAuthenticate.php +++ b/src/Controller/Component/Auth/BasicAuthenticate.php @@ -77,8 +77,8 @@ public function getUser(Request $request) { /** * Handles an unauthenticated access attempt by sending appropriate login headers * - * @param CakeRequest $request A request object. - * @param CakeResponse $response A response object. + * @param Request $request A request object. + * @param Response $response A response object. * @return void * @throws \Cake\Error\UnauthorizedException */ diff --git a/src/Controller/Component/Auth/CrudAuthorize.php b/src/Controller/Component/Auth/CrudAuthorize.php index 921307b73b2..37a8e77d8d9 100644 --- a/src/Controller/Component/Auth/CrudAuthorize.php +++ b/src/Controller/Component/Auth/CrudAuthorize.php @@ -39,7 +39,7 @@ class CrudAuthorize extends BaseAuthorize { * Sets up additional actionMap values that match the configured `Routing.prefixes`. * * @param ComponentRegistry $registry The component registry from the controller. - * @param string $settings An array of settings. This class does not use any settings. + * @param array $settings An array of settings. This class does not use any settings. */ public function __construct(ComponentRegistry $registry, $settings = array()) { parent::__construct($registry, $settings); diff --git a/src/Controller/Component/CookieComponent.php b/src/Controller/Component/CookieComponent.php index 9df4977d68d..85f939f7dd7 100644 --- a/src/Controller/Component/CookieComponent.php +++ b/src/Controller/Component/CookieComponent.php @@ -308,10 +308,10 @@ public function read($key = null) { } /** - * Returns true if given variable is set in cookie. + * Returns true if given key is set in the cookie. * - * @param string $var Variable name to check for - * @return boolean True if variable is there + * @param string $key Key to check for + * @return boolean True if the key exists */ public function check($key = null) { if (empty($key)) { diff --git a/src/Core/App.php b/src/Core/App.php index 49b0de76ef9..3ba79f4c6cd 100644 --- a/src/Core/App.php +++ b/src/Core/App.php @@ -72,7 +72,7 @@ class App { * application/plugin, otherwise try to load from the CakePHP core * * @param string $class Classname - * @param strign $type Type of class + * @param string $type Type of class * @param string $suffix Classname suffix * @return boolean|string False if the class is not found or namespaced classname */ diff --git a/src/Database/Expression/Comparison.php b/src/Database/Expression/Comparison.php index 99ecd98aa1a..a8575893b00 100644 --- a/src/Database/Expression/Comparison.php +++ b/src/Database/Expression/Comparison.php @@ -54,10 +54,10 @@ class Comparison extends QueryExpression { * @param string $type the type name used to cast the value * @param string $conjunction the operator used for comparing field and value */ - public function __construct($field, $value, $type, $conjuntion) { + public function __construct($field, $value, $type, $conjunction) { $this->field($field); $this->value($value); - $this->type($conjuntion); + $this->type($conjunction); if (is_string($type)) { $this->_type = $type; diff --git a/src/Database/Expression/IdentifierExpression.php b/src/Database/Expression/IdentifierExpression.php index 5b1b456cea6..fc01b93d25b 100644 --- a/src/Database/Expression/IdentifierExpression.php +++ b/src/Database/Expression/IdentifierExpression.php @@ -74,7 +74,7 @@ public function sql(ValueBinder $generator) { * This method is a no-op, this is a leaf type of expression, * hence there is nothing to traverse * - * @param callable $visitor + * @param callable $callable * @return void */ public function traverse(callable $callable) { diff --git a/src/Database/Expression/QueryExpression.php b/src/Database/Expression/QueryExpression.php index 80a4c9075f3..3e19697042f 100644 --- a/src/Database/Expression/QueryExpression.php +++ b/src/Database/Expression/QueryExpression.php @@ -242,7 +242,7 @@ public function notLike($field, $value, $type = null) { * "field IN (value1, value2)". * * @param string $field database field to be compared against value - * @param array $value the value to be bound to $field for comparison + * @param array $values the value to be bound to $field for comparison * @param string $type the type name for $value as configured using the Type map. * @return QueryExpression */ @@ -258,7 +258,7 @@ public function in($field, $values, $type = null) { * "field NOT IN (value1, value2)". * * @param string $field database field to be compared against value - * @param array $value the value to be bound to $field for comparison + * @param array $values the value to be bound to $field for comparison * @param string $type the type name for $value as configured using the Type map. * @return QueryExpression */ diff --git a/src/Database/Expression/TupleComparison.php b/src/Database/Expression/TupleComparison.php index c9d4dd3de9f..85ddd324e94 100644 --- a/src/Database/Expression/TupleComparison.php +++ b/src/Database/Expression/TupleComparison.php @@ -33,8 +33,8 @@ class TupleComparison extends Comparison { * one type per position in the value array in needed * @param string $conjunction the operator used for comparing field and value */ - public function __construct($fields, $values, $types = [], $conjuntion = '=') { - parent::__construct($fields, $values, $types, $conjuntion); + public function __construct($fields, $values, $types = [], $conjunction = '=') { + parent::__construct($fields, $values, $types, $conjunction); $this->_type = (array)$types; } diff --git a/src/Database/Expression/ValuesExpression.php b/src/Database/Expression/ValuesExpression.php index 638acfeeb5f..5626bf4c984 100644 --- a/src/Database/Expression/ValuesExpression.php +++ b/src/Database/Expression/ValuesExpression.php @@ -110,7 +110,7 @@ public function columns($cols = null) { * Sets the values to be inserted. If no params are passed, then it returns * the currently stored values * - * @param array $cols arrays with values to be inserted + * @param array $values arrays with values to be inserted * @return array|ValuesExpression */ public function values($values = null) { diff --git a/src/Database/FunctionsBuilder.php b/src/Database/FunctionsBuilder.php index f73e1667cdb..59267c6558c 100644 --- a/src/Database/FunctionsBuilder.php +++ b/src/Database/FunctionsBuilder.php @@ -141,8 +141,8 @@ public function coalesce($args, $types = []) { * @param array $types list of types to bind to the arguments * @return FunctionExpression */ - public function dateDiff($dates, $types = []) { - return $this->_build('DATEDIFF', $dates, $types); + public function dateDiff($args, $types = []) { + return $this->_build('DATEDIFF', $args, $types); } /** diff --git a/src/Database/Query.php b/src/Database/Query.php index 44968b46011..d740530c121 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -1129,13 +1129,13 @@ public function orHaving($conditions, $types = []) { * @param integer $num The page number you want. * @return Query */ - public function page($page) { + public function page($num) { $limit = $this->clause('limit'); if ($limit === null) { $limit = 25; $this->limit($limit); } - $this->offset(($page - 1) * $limit); + $this->offset(($num - 1) * $limit); return $this; } @@ -1304,7 +1304,7 @@ protected function _buildValuesPart($parts, $generator) { * Helper function used to covert ExpressionInterface objects inside an array * into their string representation * - * @param array $expression list of strings and ExpressionInterface objects + * @param array $expressions list of strings and ExpressionInterface objects * @param \Cake\Database\ValueBinder $generator the placeholder generator to be used in expressions * @return array */ @@ -1673,7 +1673,7 @@ public function defaultTypes(array $types = null) { * will create as many placeholders as values are in it. For example "string[]" * will create several placeholders of type string. * - * @param string|integer $token placeholder to be replaced with quoted version + * @param string|integer $param placeholder to be replaced with quoted version * of $value * @param mixed $value the value to be bound * @param string|integer $type the mapped type name, used for casting when sending diff --git a/src/Database/ValueBinder.php b/src/Database/ValueBinder.php index 3602e4e4671..ac151b95acf 100644 --- a/src/Database/ValueBinder.php +++ b/src/Database/ValueBinder.php @@ -40,7 +40,7 @@ class ValueBinder { /** * Associates a query placeholder to a value and a type * - * @param string|integer $token placeholder to be replaced with quoted version + * @param string|integer $param placeholder to be replaced with quoted version * of $value * @param mixed $value the value to be bound * @param string|integer $type the mapped type name, used for casting when sending diff --git a/src/Error/BadRequestException.php b/src/Error/BadRequestException.php index da93ed11d33..026c9e2d98b 100644 --- a/src/Error/BadRequestException.php +++ b/src/Error/BadRequestException.php @@ -27,7 +27,7 @@ class BadRequestException extends HttpException { * Constructor * * @param string $message If no message is given 'Bad Request' will be the message - * @param string $code Status code, defaults to 400 + * @param integer $code Status code, defaults to 400 */ public function __construct($message = null, $code = 400) { if (empty($message)) { diff --git a/src/Error/Exception.php b/src/Error/Exception.php index 35c63b0cf7f..cfa799ed086 100644 --- a/src/Error/Exception.php +++ b/src/Error/Exception.php @@ -47,7 +47,7 @@ class Exception extends BaseException { * * @param string|array $message Either the string of the error message, or an array of attributes * that are made available in the view, and sprintf()'d into Exception::$_messageTemplate - * @param string $code The code of the error, is also the HTTP status code for the error. + * @param integer $code The code of the error, is also the HTTP status code for the error. */ public function __construct($message, $code = 500) { if (is_array($message)) { diff --git a/src/Error/ForbiddenException.php b/src/Error/ForbiddenException.php index 23dd5200dbc..7fa64dfd600 100644 --- a/src/Error/ForbiddenException.php +++ b/src/Error/ForbiddenException.php @@ -27,7 +27,7 @@ class ForbiddenException extends HttpException { * Constructor * * @param string $message If no message is given 'Forbidden' will be the message - * @param string $code Status code, defaults to 403 + * @param integer $code Status code, defaults to 403 */ public function __construct($message = null, $code = 403) { if (empty($message)) { diff --git a/src/Error/InternalErrorException.php b/src/Error/InternalErrorException.php index 04bb2a3fbd0..97ac6fa9985 100644 --- a/src/Error/InternalErrorException.php +++ b/src/Error/InternalErrorException.php @@ -27,7 +27,7 @@ class InternalErrorException extends HttpException { * Constructor * * @param string $message If no message is given 'Internal Server Error' will be the message - * @param string $code Status code, defaults to 500 + * @param integer $code Status code, defaults to 500 */ public function __construct($message = null, $code = 500) { if (empty($message)) { diff --git a/src/Error/MethodNotAllowedException.php b/src/Error/MethodNotAllowedException.php index e83e57e37d4..71eeddf909c 100644 --- a/src/Error/MethodNotAllowedException.php +++ b/src/Error/MethodNotAllowedException.php @@ -27,7 +27,7 @@ class MethodNotAllowedException extends HttpException { * Constructor * * @param string $message If no message is given 'Method Not Allowed' will be the message - * @param string $code Status code, defaults to 405 + * @param integer $code Status code, defaults to 405 */ public function __construct($message = null, $code = 405) { if (empty($message)) { diff --git a/src/Error/NotFoundException.php b/src/Error/NotFoundException.php index df76a26437b..e5727b22009 100644 --- a/src/Error/NotFoundException.php +++ b/src/Error/NotFoundException.php @@ -27,7 +27,7 @@ class NotFoundException extends HttpException { * Constructor * * @param string $message If no message is given 'Not Found' will be the message - * @param string $code Status code, defaults to 404 + * @param integer $code Status code, defaults to 404 */ public function __construct($message = null, $code = 404) { if (empty($message)) { diff --git a/src/Error/PrivateActionException.php b/src/Error/PrivateActionException.php index 28f0e80586b..fc72e4c6efe 100644 --- a/src/Error/PrivateActionException.php +++ b/src/Error/PrivateActionException.php @@ -33,7 +33,7 @@ class PrivateActionException extends Exception { * * @param string $message Excception message * @param integer $code Exception code - * @param \Exception $previous Previous exception + * @param Exception $previous Previous exception */ public function __construct($message, $code = 404, Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/src/Error/UnauthorizedException.php b/src/Error/UnauthorizedException.php index 739f06cc196..e99204e81b1 100644 --- a/src/Error/UnauthorizedException.php +++ b/src/Error/UnauthorizedException.php @@ -27,7 +27,7 @@ class UnauthorizedException extends HttpException { * Constructor * * @param string $message If no message is given 'Unauthorized' will be the message - * @param string $code Status code, defaults to 401 + * @param integer $code Status code, defaults to 401 */ public function __construct($message = null, $code = 401) { if (empty($message)) { diff --git a/src/I18n/I18n.php b/src/I18n/I18n.php index 0ba409e52b4..53ab17cb624 100644 --- a/src/I18n/I18n.php +++ b/src/I18n/I18n.php @@ -138,7 +138,7 @@ public static function getInstance() { * @param string $plural Plural string (if any) * @param string $domain Domain The domain of the translation. Domains are often used by plugin translations. * If null, the default domain will be used. - * @param string $category Category The integer value of the category to use. + * @param integer $category Category The integer value of the category to use. * @param integer $count Count Count is used with $plural to choose the correct plural form. * @param string $language Language to translate string to. * If null it checks for language in session followed by Config.language configuration variable. diff --git a/src/Log/Engine/FileLog.php b/src/Log/Engine/FileLog.php index 629b560f984..cebc4d634ea 100644 --- a/src/Log/Engine/FileLog.php +++ b/src/Log/Engine/FileLog.php @@ -75,7 +75,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); diff --git a/src/Network/Http/Auth/Basic.php b/src/Network/Http/Auth/Basic.php index f60b755b0da..a9e125c3151 100644 --- a/src/Network/Http/Auth/Basic.php +++ b/src/Network/Http/Auth/Basic.php @@ -41,8 +41,8 @@ public function authentication(Request $request, $credentials) { /** * Proxy Authentication * - * @param HttpSocket $http - * @param array $proxyInfo + * @param Request $request + * @param array $credentials * @return void * @see http://www.ietf.org/rfc/rfc2617.txt */ diff --git a/src/Network/Http/Auth/Oauth.php b/src/Network/Http/Auth/Oauth.php index 49b008e9853..0fa4c98022d 100644 --- a/src/Network/Http/Auth/Oauth.php +++ b/src/Network/Http/Auth/Oauth.php @@ -33,7 +33,7 @@ class Oauth { * Add headers for Oauth authorization. * * @param Request $request - * @param array $options + * @param array $credentials * @return void * @throws \Cake\Error\Exception On invalid signature types. */ @@ -228,7 +228,7 @@ protected function _normalizedParams($request, $oauthValues) { /** * Builds the Oauth Authorization header value. * - * @param array $values The oauth_* values to build + * @param array $data The oauth_* values to build * @return string */ protected function _buildAuth($data) { diff --git a/src/Network/Request.php b/src/Network/Request.php index f0a94cb7aa7..b5fca4d5436 100644 --- a/src/Network/Request.php +++ b/src/Network/Request.php @@ -384,7 +384,7 @@ protected static function _base() { /** * Process uploaded files and move things onto the post data. * - * @param array $data Post data to merge files onto. + * @param array $post Post data to merge files onto. * @param array $files Uploaded files to merge in. * @return array merged post + file data. */ diff --git a/src/Network/Response.php b/src/Network/Response.php index d2384f1fb1d..461d95e1a08 100644 --- a/src/Network/Response.php +++ b/src/Network/Response.php @@ -1034,14 +1034,14 @@ 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 $hash the unique hash that identifies this response * @param boolean $weak whether the response is semantically the same as * other with the same hash or not * @return string */ - public function etag($tag = null, $weak = false) { - if ($tag !== null) { - $this->_headers['Etag'] = sprintf('%s"%s"', ($weak) ? 'W/' : null, $tag); + public function etag($hash = null, $weak = false) { + if ($hash !== null) { + $this->_headers['Etag'] = sprintf('%s"%s"', ($weak) ? 'W/' : null, $hash); } if (isset($this->_headers['Etag'])) { return $this->_headers['Etag']; @@ -1142,7 +1142,7 @@ public function length($bytes = null) { * the Last-Modified etag response header before calling this method. Otherwise * a comparison will not be possible. * - * @param CakeRequest $request Request object + * @param Request $request Request object * @return boolean whether the response was marked as not modified or not. */ public function checkNotModified(Request $request) { diff --git a/src/Network/Session/CacheSession.php b/src/Network/Session/CacheSession.php index 3dc023d95b2..6ae725f1848 100644 --- a/src/Network/Session/CacheSession.php +++ b/src/Network/Session/CacheSession.php @@ -30,8 +30,8 @@ class CacheSession implements SessionHandlerInterface { /** * Method called on open of a database session. * - * @param The path where to store/retrieve the session. - * @param The session name. + * @param string $savePath The path where to store/retrieve the session. + * @param string $name The session name. * @return boolean Success */ public function open($savePath, $name) { diff --git a/src/Network/Session/DatabaseSession.php b/src/Network/Session/DatabaseSession.php index ce2bb65dc1d..c16b070e315 100644 --- a/src/Network/Session/DatabaseSession.php +++ b/src/Network/Session/DatabaseSession.php @@ -63,8 +63,8 @@ public function __construct() { /** * Method called on open of a database session. * - * @param The path where to store/retrieve the session. - * @param The session name. + * @param string $savePath The path where to store/retrieve the session. + * @param string $name The session name. * @return boolean Success */ public function open($savePath, $name) { diff --git a/src/ORM/Association.php b/src/ORM/Association.php index c6622c49df0..d2459075b53 100644 --- a/src/ORM/Association.php +++ b/src/ORM/Association.php @@ -445,7 +445,7 @@ public function attachTo(Query $query, array $options = []) { * Correctly nests a result row associated values into the correct array keys inside the * source results. * - * @param array $result + * @param array $row * @return array */ public function transformRow($row) { diff --git a/src/ORM/Association/ExternalAssociationTrait.php b/src/ORM/Association/ExternalAssociationTrait.php index 0515eca013c..c5ad1c54bc4 100644 --- a/src/ORM/Association/ExternalAssociationTrait.php +++ b/src/ORM/Association/ExternalAssociationTrait.php @@ -92,7 +92,7 @@ public function requiresKeys($options = []) { * Correctly nests a result row associated values into the correct array keys inside the * source results. * - * @param array $result + * @param array $row * @return array */ public function transformRow($row) { diff --git a/src/ORM/EntityValidator.php b/src/ORM/EntityValidator.php index 0407ee27e81..9b11e6107ae 100644 --- a/src/ORM/EntityValidator.php +++ b/src/ORM/EntityValidator.php @@ -116,10 +116,10 @@ public function one(Entity $entity, $options = []) { * associations to also be validated. * @return boolean true if all validations passed, false otherwise */ - public function many(array $entities, $include = []) { + public function many(array $entities, $options = []) { $valid = true; foreach ($entities as $entity) { - $valid = $this->one($entity, $include) && $valid; + $valid = $this->one($entity, $options) && $valid; } return $valid; } diff --git a/src/ORM/Marshaller.php b/src/ORM/Marshaller.php index 102b27333ee..9393a629f06 100644 --- a/src/ORM/Marshaller.php +++ b/src/ORM/Marshaller.php @@ -153,7 +153,7 @@ public function many(array $data, $include = []) { * for junction table entities. * * @param Association $assoc The association to marshall. - * @param array $values The data to convert into entities. + * @param array $data The data to convert into entities. * @param array $include The nested associations to convert. * @return array An array of built entities. */ diff --git a/src/ORM/Table.php b/src/ORM/Table.php index 3a970432d6b..59101dbc22c 100644 --- a/src/ORM/Table.php +++ b/src/ORM/Table.php @@ -280,7 +280,7 @@ public function table($table = null) { /** * Returns the table alias or sets a new one * - * @param string $table the new table alias + * @param string $alias the new table alias * @return string */ public function alias($alias = null) { @@ -947,18 +947,18 @@ public function updateAll($fields, $conditions) { * @param \Cake\Validation\Validator $validator * @return \Cake\Validation\Validator */ - public function validator($name = 'default', Validator $instance = null) { - if ($instance === null && isset($this->_validators[$name])) { + public function validator($name = 'default', Validator $validator = null) { + if ($validator === null && isset($this->_validators[$name])) { return $this->_validators[$name]; } - if ($instance === null) { - $instance = new Validator(); - $instance = $this->{'validation' . ucfirst($name)}($instance); + if ($validator === null) { + $validator = new Validator(); + $validator = $this->{'validation' . ucfirst($name)}($validator); } - $instance->provider('table', $this); - return $this->_validators[$name] = $instance; + $validator->provider('table', $this); + return $this->_validators[$name] = $validator; } /** @@ -1391,7 +1391,7 @@ protected function _processDelete($entity, $options) { * * @param string $type name of the finder to be called * @param \Cake\ORM\Query $query The query object to apply the finder options to - * @param array $args List of options to pass to the finder + * @param array $options List of options to pass to the finder * @return \Cake\ORM\Query * @throws \BadMethodCallException */ diff --git a/src/Routing/DispatcherFilter.php b/src/Routing/DispatcherFilter.php index 87101b8d378..611aab230a9 100644 --- a/src/Routing/DispatcherFilter.php +++ b/src/Routing/DispatcherFilter.php @@ -46,7 +46,7 @@ abstract class DispatcherFilter implements EventListener { /** * Constructor. * - * @param string $setting Configuration settings for the filter. + * @param array $settings Configuration settings for the filter. */ public function __construct($settings = array()) { $this->settings = Hash::merge($this->settings, $settings); diff --git a/src/Routing/Route/RedirectRoute.php b/src/Routing/Route/RedirectRoute.php index 00f0a6611ad..acce7460283 100644 --- a/src/Routing/Route/RedirectRoute.php +++ b/src/Routing/Route/RedirectRoute.php @@ -116,7 +116,7 @@ public function match($url, $context = array()) { * Stop execution of the current script. Wraps exit() making * testing easier. * - * @param integer|string $status see http://php.net/exit for values + * @param integer|string $code see http://php.net/exit for values * @return void */ protected function _stop($code = 0) { diff --git a/src/TestSuite/Fixture/FixtureInjector.php b/src/TestSuite/Fixture/FixtureInjector.php index 1529881ccd4..941087f8177 100644 --- a/src/TestSuite/Fixture/FixtureInjector.php +++ b/src/TestSuite/Fixture/FixtureInjector.php @@ -99,7 +99,7 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser * Not Implemented * * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_AssertionFailedError $e + * @param Exception $e * @param float $time * @return void */ @@ -139,6 +139,9 @@ public function endTest(PHPUnit_Framework_Test $test, $time) { /** * Not Implemented * + * @param PHPUnit_Framework_Test $test + * @param Exception $e + * @param float $time * @return void */ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) { diff --git a/src/TestSuite/Fixture/TestFixture.php b/src/TestSuite/Fixture/TestFixture.php index 707560637ee..6a9f8b1fada 100644 --- a/src/TestSuite/Fixture/TestFixture.php +++ b/src/TestSuite/Fixture/TestFixture.php @@ -313,7 +313,7 @@ protected function _getRecords() { * Truncates the current fixture. Can be overwritten by classes extending * CakeFixture to trigger other events before / after truncate. * - * @param Connection DboSource $db A reference to a db instance + * @param Connection $db A reference to a db instance * @return boolean */ public function truncate(Connection $db) { diff --git a/src/TestSuite/Reporter/BaseReporter.php b/src/TestSuite/Reporter/BaseReporter.php index 5013c8a56bc..5f2a4387310 100644 --- a/src/TestSuite/Reporter/BaseReporter.php +++ b/src/TestSuite/Reporter/BaseReporter.php @@ -130,9 +130,9 @@ public function printResult(\PHPUnit_Framework_TestResult $result) { /** * An error occurred. * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time + * @param \PHPUnit_Framework_Test $test + * @param \Exception $e + * @param float $time */ public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time) { $this->paintException($e, $test); @@ -141,9 +141,9 @@ public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time) { /** * A failure occurred. * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_AssertionFailedError $e - * @param float $time + * @param \PHPUnit_Framework_Test $test + * @param \PHPUnit_Framework_AssertionFailedError $e + * @param float $time */ public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time) { $this->paintFail($e, $test); @@ -152,9 +152,9 @@ public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Ass /** * Incomplete test. * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time + * @param \PHPUnit_Framework_Test $test + * @param \Exception $e + * @param float $time */ public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) { $this->paintSkip($e, $test); @@ -163,9 +163,9 @@ public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, /** * Skipped test. * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time + * @param \PHPUnit_Framework_Test $test + * @param \Exception $e + * @param float $time */ public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) { $this->paintSkip($e, $test); @@ -174,7 +174,7 @@ public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $ti /** * A test suite started. * - * @param PHPUnit_Framework_TestSuite $suite + * @param \PHPUnit_Framework_TestSuite $suite */ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) { if (!$this->_headerSent) { @@ -186,7 +186,7 @@ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) { /** * A test suite ended. * - * @param PHPUnit_Framework_TestSuite $suite + * @param \PHPUnit_Framework_TestSuite $suite */ public function endTestSuite(\PHPUnit_Framework_TestSuite $suite) { } @@ -194,7 +194,7 @@ public function endTestSuite(\PHPUnit_Framework_TestSuite $suite) { /** * A test started. * - * @param PHPUnit_Framework_Test $test + * @param \PHPUnit_Framework_Test $test */ public function startTest(\PHPUnit_Framework_Test $test) { } @@ -202,8 +202,8 @@ public function startTest(\PHPUnit_Framework_Test $test) { /** * A test ended. * - * @param PHPUnit_Framework_Test $test - * @param float $time + * @param \PHPUnit_Framework_Test $test + * @param float $time */ public function endTest(\PHPUnit_Framework_Test $test, $time) { $this->numAssertions += $test->getNumAssertions(); diff --git a/src/TestSuite/Reporter/HtmlReporter.php b/src/TestSuite/Reporter/HtmlReporter.php index 903f0766733..ecfb8bc14db 100644 --- a/src/TestSuite/Reporter/HtmlReporter.php +++ b/src/TestSuite/Reporter/HtmlReporter.php @@ -280,7 +280,7 @@ public function paintFail($message, $test) { * trail of the nesting test suites below the * top level test. * - * @param PHPUnit_Framework_Test test method that just passed + * @param \PHPUnit_Framework_Test test method that just passed * @param float $time time spent to run the test method * @return void */ @@ -301,14 +301,14 @@ public function paintPass(\PHPUnit_Framework_Test $test, $time = null) { * @param mixed $test * @return void */ - public function paintException($message, $test) { - $trace = $this->_getStackTrace($message); + public function paintException($exception, $test) { + $trace = $this->_getStackTrace($exception); $testName = get_class($test) . '(' . $test->getName() . ')'; echo "