From 5a0337dfe4c28e48572746f262fe3911a2c383cf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 12 Apr 2020 18:10:21 +0200 Subject: [PATCH] Tweak the code to avoid fabbot false positives --- Constraints/BicValidator.php | 2 +- Constraints/RangeValidator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Constraints/BicValidator.php b/Constraints/BicValidator.php index c49986561..651d76dcf 100644 --- a/Constraints/BicValidator.php +++ b/Constraints/BicValidator.php @@ -138,7 +138,7 @@ public function validate($value, Constraint $constraint) try { $iban = $this->getPropertyAccessor()->getValue($object, $path); } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: %s.', $path, \get_class($constraint), $e->getMessage()), 0, $e); + throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $path, \get_class($constraint)), 0, $e); } } if (!$iban) { diff --git a/Constraints/RangeValidator.php b/Constraints/RangeValidator.php index 9b7c40ce5..3cfd43f99 100644 --- a/Constraints/RangeValidator.php +++ b/Constraints/RangeValidator.php @@ -157,7 +157,7 @@ private function getLimit($propertyPath, $default, Constraint $constraint) try { return $this->getPropertyAccessor()->getValue($object, $propertyPath); } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: %s.', $propertyPath, \get_class($constraint), $e->getMessage()), 0, $e); + throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $propertyPath, \get_class($constraint)), 0, $e); } }