[Validator] Added inheritDoc phpdoc for validate methods
This commit is contained in:
parent
36d12dde5b
commit
07992d352c
@ -23,12 +23,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class AllValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class BlankValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
|
||||
class CallbackValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $object The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($object, Constraint $constraint)
|
||||
{
|
||||
|
@ -28,12 +28,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class ChoiceValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Constraints\Collection\Required;
|
||||
class CollectionValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -21,10 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class CountValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class CountryValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ class DateValidator extends ConstraintValidator
|
||||
const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/';
|
||||
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -23,12 +23,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class EmailValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class FalseValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -26,12 +26,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
class FileValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,6 +22,9 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
|
||||
*/
|
||||
class ImageValidator extends FileValidator
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
$violations = count($this->context->getViolations());
|
||||
|
@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class IpValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class LanguageValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -21,10 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class LengthValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class LocaleValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class MaxLengthValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -24,12 +24,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class MaxValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constrain for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class MinLengthValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class NotBlankValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class NotNullValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class NullValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -20,12 +20,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class RangeValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @return Boolean Whether or not the value is valid
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
class RegexValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ class TimeValidator extends ConstraintValidator
|
||||
const PATTERN = '/^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/';
|
||||
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class TrueValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
|
||||
class TypeValidator extends ConstraintValidator
|
||||
{
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
@ -38,12 +38,7 @@ class UrlValidator extends ConstraintValidator
|
||||
$~ixu';
|
||||
|
||||
/**
|
||||
* Checks if the passed value is valid.
|
||||
*
|
||||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*
|
||||
* @api
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
|
Reference in New Issue
Block a user