Skip to content
Permalink
Browse files

Fix docblock/function signature mismatches (parameter name typos, wro…

…ng parameter types, missing parameter tags, invalid/wrong/missing return types, missing/unnecessary leading backslashes for namespaces, etc...)
  • Loading branch information...
ndm2
ndm2 committed Feb 21, 2014
1 parent 3077199 commit 29caa951c328ba43c4ed2869a7d4ae1aa1091c64
Showing with 171 additions and 136 deletions.
  1. +1 −1 src/Cache/CacheEngine.php
  2. +1 −1 src/Collection/CollectionTrait.php
  3. +2 −2 src/Collection/Iterator/SortIterator.php
  4. +5 −5 src/Configure/Engine/IniConfig.php
  5. +2 −2 src/Console/ConsoleInputArgument.php
  6. +2 −2 src/Console/ConsoleInputOption.php
  7. +2 −2 src/Console/ConsoleInputSubcommand.php
  8. +1 −1 src/Controller/Component/Acl/AclInterface.php
  9. +1 −1 src/Controller/Component/Acl/IniAcl.php
  10. +1 −1 src/Controller/Component/Acl/PhpAcl.php
  11. +1 −1 src/Controller/Component/Auth/BaseAuthorize.php
  12. +2 −2 src/Controller/Component/Auth/BasicAuthenticate.php
  13. +1 −1 src/Controller/Component/Auth/CrudAuthorize.php
  14. +3 −3 src/Controller/Component/CookieComponent.php
  15. +1 −1 src/Core/App.php
  16. +2 −2 src/Database/Expression/Comparison.php
  17. +1 −1 src/Database/Expression/IdentifierExpression.php
  18. +2 −2 src/Database/Expression/QueryExpression.php
  19. +2 −2 src/Database/Expression/TupleComparison.php
  20. +1 −1 src/Database/Expression/ValuesExpression.php
  21. +2 −2 src/Database/FunctionsBuilder.php
  22. +4 −4 src/Database/Query.php
  23. +1 −1 src/Database/ValueBinder.php
  24. +1 −1 src/Error/BadRequestException.php
  25. +1 −1 src/Error/Exception.php
  26. +1 −1 src/Error/ForbiddenException.php
  27. +1 −1 src/Error/InternalErrorException.php
  28. +1 −1 src/Error/MethodNotAllowedException.php
  29. +1 −1 src/Error/NotFoundException.php
  30. +1 −1 src/Error/PrivateActionException.php
  31. +1 −1 src/Error/UnauthorizedException.php
  32. +1 −1 src/I18n/I18n.php
  33. +1 −1 src/Log/Engine/FileLog.php
  34. +2 −2 src/Network/Http/Auth/Basic.php
  35. +2 −2 src/Network/Http/Auth/Oauth.php
  36. +1 −1 src/Network/Request.php
  37. +5 −5 src/Network/Response.php
  38. +2 −2 src/Network/Session/CacheSession.php
  39. +2 −2 src/Network/Session/DatabaseSession.php
  40. +1 −1 src/ORM/Association.php
  41. +1 −1 src/ORM/Association/ExternalAssociationTrait.php
  42. +2 −2 src/ORM/EntityValidator.php
  43. +1 −1 src/ORM/Marshaller.php
  44. +9 −9 src/ORM/Table.php
  45. +1 −1 src/Routing/DispatcherFilter.php
  46. +1 −1 src/Routing/Route/RedirectRoute.php
  47. +4 −1 src/TestSuite/Fixture/FixtureInjector.php
  48. +1 −1 src/TestSuite/Fixture/TestFixture.php
  49. +17 −17 src/TestSuite/Reporter/BaseReporter.php
  50. +7 −7 src/TestSuite/Reporter/HtmlReporter.php
  51. +5 −6 src/TestSuite/TestCase.php
  52. +2 −2 src/TestSuite/TestPermutationDecorator.php
  53. +1 −1 src/TestSuite/TestRunner.php
  54. +2 −2 src/Utility/File.php
  55. +3 −3 src/Utility/Hash.php
  56. +1 −1 src/Utility/ObjectRegistry.php
  57. +1 −1 src/View/View.php
  58. +2 −1 src/View/Widget/IdGeneratorTrait.php
  59. +1 −1 src/View/Widget/InputRegistry.php
  60. +1 −0 tests/TestCase/Cache/Engine/ApcEngineTest.php
  61. +1 −0 tests/TestCase/Cache/Engine/FileEngineTest.php
  62. +1 −0 tests/TestCase/Cache/Engine/MemcachedEngineTest.php
  63. +1 −0 tests/TestCase/Cache/Engine/RedisEngineTest.php
  64. +1 −0 tests/TestCase/Cache/Engine/WincacheEngineTest.php
  65. +1 −0 tests/TestCase/Cache/Engine/XcacheEngineTest.php
  66. +1 −1 tests/TestCase/Console/ShellDispatcherTest.php
  67. +2 −1 tests/TestCase/Controller/Component/CookieComponentTest.php
  68. +1 −0 tests/TestCase/Controller/Component/PaginatorComponentTest.php
  69. +2 −2 tests/TestCase/Controller/Component/SecurityComponentTest.php
  70. +6 −2 tests/TestCase/Controller/ControllerTest.php
  71. +1 −0 tests/TestCase/Core/ObjectTest.php
  72. +1 −1 tests/TestCase/Database/Expression/IdentifierExpressionTest.php
  73. +1 −0 tests/TestCase/Database/QueryTest.php
  74. +1 −0 tests/TestCase/Database/Schema/MysqlSchemaTest.php
  75. +1 −0 tests/TestCase/Database/Schema/PostgresSchemaTest.php
  76. +1 −0 tests/TestCase/Error/ExceptionRendererTest.php
  77. +7 −0 tests/TestCase/I18n/I18nTest.php
  78. +1 −0 tests/TestCase/Log/Engine/FileLogTest.php
  79. +1 −0 tests/TestCase/Model/Behavior/TranslateBehaviorTest.php
  80. +1 −1 tests/TestCase/Network/Email/SmtpTransportTest.php
  81. +1 −1 tests/TestCase/ORM/EntityTest.php
  82. +0 −1 tests/TestCase/Utility/TimeTest.php
  83. +2 −1 tests/TestCase/Validation/ValidationTest.php
  84. +1 −0 tests/TestCase/View/Helper/FormHelperTest.php
  85. +1 −0 tests/test_app/TestApp/Controller/AjaxAuthController.php
  86. +2 −0 tests/test_app/TestApp/Controller/RequestHandlerTestController.php
  87. +1 −0 tests/test_app/TestApp/Controller/SomePostsController.php
  88. +1 −0 tests/test_app/TestApp/Controller/TestCachedPagesController.php
@@ -148,7 +148,7 @@ public function gc($expires = null) {
* 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) {
@@ -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
*/
@@ -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);
}
/**
@@ -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;
}
/**
@@ -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');
@@ -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');
@@ -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');
@@ -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);
@@ -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) {
@@ -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) {
@@ -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;
@@ -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
*/
@@ -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);
@@ -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)) {
@@ -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
*/
@@ -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;
@@ -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) {
@@ -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
*/
@@ -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;
}
@@ -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) {
@@ -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);
}
/**
@@ -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
@@ -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
@@ -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)) {
@@ -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)) {
@@ -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)) {
@@ -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)) {
@@ -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)) {
@@ -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)) {
@@ -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);
@@ -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)) {
@@ -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.
@@ -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);
@@ -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
*/
@@ -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) {
Oops, something went wrong.

0 comments on commit 29caa95

Please sign in to comment.
You can’t perform that action at this time.