Update type parameters for Validator doc blocks

The "@param" tag uses phpdoc types. However the "@method" tag uses PHP's
type declarations. Therefore, "mixed" refers to a class whose literal
name is mixed and not the "mixed" keyword. Since "mixed" is not a valid
class name in this context, the type paramaters should be removed.

Additionally, the "callable" type paramater can be used on the
"callback" validation method.

References:
[1]: http://docs.phpdoc.org/references/phpdoc/tags/param.html
[2]: http://docs.phpdoc.org/references/phpdoc/types.html
[3]: http://docs.phpdoc.org/references/phpdoc/tags/method.html
[4]: http://php.net/functions.arguments#functions.arguments.type-declaration
[5]: http://docs.phpdoc.org/references/phpdoc/types.html
Reviewed-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Tim Bond 2018-04-24 18:44:06 -07:00 committed by Henrique Moody
parent 4c996258a1
commit 020ea1ebb5
No known key found for this signature in database
GPG key ID: 221E9281655813A6

View file

@ -32,19 +32,19 @@ use Respect\Validation\Rules\Key;
* @method static Validator bank(string $countryCode)
* @method static Validator bankAccount(string $countryCode)
* @method static Validator base()
* @method static Validator between(mixed $min = null, mixed $max = null, bool $inclusive = true)
* @method static Validator between($min = null, $max = null, bool $inclusive = true)
* @method static Validator bic(string $countryCode)
* @method static Validator boolType()
* @method static Validator boolVal()
* @method static Validator bsn()
* @method static Validator call()
* @method static Validator callableType()
* @method static Validator callback(mixed $callback)
* @method static Validator charset(mixed $charset)
* @method static Validator callback(callable $callback)
* @method static Validator charset($charset)
* @method static Validator cnh()
* @method static Validator cnpj()
* @method static Validator consonant(string $additionalChars = null)
* @method static Validator contains(mixed $containsValue, bool $identical = false)
* @method static Validator contains($containsValue, bool $identical = false)
* @method static Validator countable()
* @method static Validator countryCode()
* @method static Validator currencyCode()
@ -56,8 +56,8 @@ use Respect\Validation\Rules\Key;
* @method static Validator domain(bool $tldCheck = true)
* @method static Validator each(Validatable $itemValidator = null, Validatable $keyValidator = null)
* @method static Validator email()
* @method static Validator endsWith(mixed $endValue, bool $identical = false)
* @method static Validator equals(mixed $compareTo)
* @method static Validator endsWith($endValue, bool $identical = false)
* @method static Validator equals($compareTo)
* @method static Validator even()
* @method static Validator executable()
* @method static Validator exists()
@ -66,22 +66,22 @@ use Respect\Validation\Rules\Key;
* @method static Validator falseVal()
* @method static Validator fibonacci()
* @method static Validator file()
* @method static Validator filterVar(int $filter, mixed $options = null)
* @method static Validator filterVar(int $filter, $options = null)
* @method static Validator finite()
* @method static Validator floatVal()
* @method static Validator floatType()
* @method static Validator graph(string $additionalChars = null)
* @method static Validator hexRgbColor()
* @method static Validator identical(mixed $value)
* @method static Validator identical($value)
* @method static Validator identityCard(string $countryCode)
* @method static Validator image(finfo $fileInfo = null)
* @method static Validator imei()
* @method static Validator in(mixed $haystack, bool $compareIdentical = false)
* @method static Validator in($haystack, bool $compareIdentical = false)
* @method static Validator infinite()
* @method static Validator instance(string $instanceName)
* @method static Validator intVal()
* @method static Validator intType()
* @method static Validator ip(mixed $ipOptions = null)
* @method static Validator ip($ipOptions = null)
* @method static Validator iterableType()
* @method static Validator json()
* @method static Validator key(string $reference, Validatable $referenceValidator = null, bool $mandatory = true)
@ -94,9 +94,9 @@ use Respect\Validation\Rules\Key;
* @method static Validator length(int $min = null, int $max = null, bool $inclusive = true)
* @method static Validator lowercase()
* @method static Validator macAddress()
* @method static Validator max(mixed $maxValue, bool $inclusive = true)
* @method static Validator max($maxValue, bool $inclusive = true)
* @method static Validator mimetype(string $mimetype)
* @method static Validator min(mixed $minValue, bool $inclusive = true)
* @method static Validator min($minValue, bool $inclusive = true)
* @method static Validator minimumAge(int $age)
* @method static Validator multiple(int $multipleOf)
* @method static Validator negative()
@ -131,7 +131,7 @@ use Respect\Validation\Rules\Key;
* @method static Validator size(string $minSize = null, string $maxSize = null)
* @method static Validator slug()
* @method static Validator space(string $additionalChars = null)
* @method static Validator startsWith(mixed $startValue, bool $identical = false)
* @method static Validator startsWith($startValue, bool $identical = false)
* @method static Validator stringType()
* @method static Validator subdivisionCode(string $countryCode)
* @method static Validator symbolicLink()
@ -148,7 +148,7 @@ use Respect\Validation\Rules\Key;
* @method static Validator writable()
* @method static Validator xdigit(string $additionalChars = null)
* @method static Validator yes($useLocale = false)
* @method static Validator zend(mixed $validator, array $params = null)
* @method static Validator zend($validator, array $params = null)
*/
class Validator extends AllOf
{