[Validator] Added inheritDoc phpdoc for validate methods

This commit is contained in:
Daniel Holmes 2012-07-14 17:42:20 -07:00
parent 36d12dde5b
commit 07992d352c
28 changed files with 30 additions and 158 deletions

View File

@ -23,12 +23,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class AllValidator extends ConstraintValidator class AllValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class BlankValidator extends ConstraintValidator class BlankValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
class CallbackValidator extends ConstraintValidator class CallbackValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $object The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($object, Constraint $constraint) public function validate($object, Constraint $constraint)
{ {

View File

@ -28,12 +28,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class ChoiceValidator extends ConstraintValidator class ChoiceValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Constraints\Collection\Required;
class CollectionValidator extends ConstraintValidator class CollectionValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -21,10 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class CountValidator extends ConstraintValidator class CountValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class CountryValidator extends ConstraintValidator class CountryValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ class DateValidator extends ConstraintValidator
const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/'; const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/';
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -23,12 +23,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class EmailValidator extends ConstraintValidator class EmailValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class FalseValidator extends ConstraintValidator class FalseValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -26,12 +26,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class FileValidator extends ConstraintValidator class FileValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,6 +22,9 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
*/ */
class ImageValidator extends FileValidator class ImageValidator extends FileValidator
{ {
/**
* {@inheritDoc}
*/
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {
$violations = count($this->context->getViolations()); $violations = count($this->context->getViolations());

View File

@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class IpValidator extends ConstraintValidator class IpValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class LanguageValidator extends ConstraintValidator class LanguageValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -21,10 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class LengthValidator extends ConstraintValidator class LengthValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class LocaleValidator extends ConstraintValidator class LocaleValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class MaxLengthValidator extends ConstraintValidator class MaxLengthValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -24,12 +24,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class MaxValidator extends ConstraintValidator class MaxValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constrain for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -25,12 +25,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class MinLengthValidator extends ConstraintValidator class MinLengthValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class NotBlankValidator extends ConstraintValidator class NotBlankValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class NotNullValidator extends ConstraintValidator class NotNullValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class NullValidator extends ConstraintValidator class NullValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -20,12 +20,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class RangeValidator extends ConstraintValidator class RangeValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @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
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -26,12 +26,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class RegexValidator extends ConstraintValidator class RegexValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -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])$/'; 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. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class TrueValidator extends ConstraintValidator class TrueValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -22,12 +22,7 @@ use Symfony\Component\Validator\ConstraintValidator;
class TypeValidator extends ConstraintValidator class TypeValidator extends ConstraintValidator
{ {
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {

View File

@ -38,12 +38,7 @@ class UrlValidator extends ConstraintValidator
$~ixu'; $~ixu';
/** /**
* Checks if the passed value is valid. * {@inheritDoc}
*
* @param mixed $value The value that should be validated
* @param Constraint $constraint The constraint for the validation
*
* @api
*/ */
public function validate($value, Constraint $constraint) public function validate($value, Constraint $constraint)
{ {