Skip to content

Commit

Permalink
Fix for deprecation notice validate() might add void
Browse files Browse the repository at this point in the history
  • Loading branch information
divya-intelli committed Oct 26, 2023
1 parent 05d1029 commit e8b9788
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function create(ContainerInterface $container) {
/**
* {@inheritdoc}
*/
public function validate($value, Constraint $constraint) {
public function validate($value, Constraint $constraint): void {
$this->validateInstance($value);
$price = $this->getPrice($value);
$range = $this->getRange($value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PriceRangeMinimumGreaterMaximumConstraintValidator extends ConstraintValid
/**
* {@inheritdoc}
*/
public function validate($value, Constraint $constraint) {
public function validate($value, Constraint $constraint): void {
if (!($value instanceof PriceRangeItem)) {
throw new UnexpectedTypeException($value, PriceRangeItem::class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function create(ContainerInterface $container) {
/**
* {@inheritdoc}
*/
public function validate($value, Constraint $constraint) {
public function validate($value, Constraint $constraint): void {
if (!($value instanceof PriceRangeItem)) {
throw new UnexpectedTypeException($value, PriceRangeItem::class);
}
Expand Down

0 comments on commit e8b9788

Please sign in to comment.