Skip to content

Commit 1626841

Browse files
committed
Tweak the code to avoid fabbot false positives
1 parent e885fb7 commit 1626841

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function validate($value, Constraint $constraint)
5555
try {
5656
$comparedValue = $this->getPropertyAccessor()->getValue($object, $path);
5757
} catch (NoSuchPropertyException $e) {
58-
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: %s.', $path, \get_class($constraint), $e->getMessage()), 0, $e);
58+
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $path, \get_class($constraint)), 0, $e);
5959
}
6060
} else {
6161
$comparedValue = $constraint->value;

Constraints/CallbackValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function validate($object, Constraint $constraint)
4040
if (isset($method[0]) && \is_object($method[0])) {
4141
$method[0] = \get_class($method[0]);
4242
}
43-
throw new ConstraintDefinitionException(sprintf('%s targeted by Callback constraint is not a valid callable.', json_encode($method)));
43+
throw new ConstraintDefinitionException(json_encode($method).' targeted by Callback constraint is not a valid callable.');
4444
}
4545

4646
\call_user_func($method, $object, $this->context, $constraint->payload);

0 commit comments

Comments
 (0)