X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FEqualToValidator.php;fp=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FEqualToValidator.php;h=fe1f3620fff2970018df9e312a3517bda6729982;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/symfony/validator/Constraints/EqualToValidator.php b/vendor/symfony/validator/Constraints/EqualToValidator.php new file mode 100644 index 000000000..fe1f3620f --- /dev/null +++ b/vendor/symfony/validator/Constraints/EqualToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are equal (==). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class EqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 == $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } +}