Skip to content

Commit e26a7b8

Browse files
author
Douglas Greenshields
committed
fix: remove breaks following returns in a switch (PHP7 compat)
1 parent 9346dfb commit e26a7b8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Validator/LocalizedPostalCodeValidatorClosureProvider.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function fetchValidatorForCountry($country, $message = null)
6262
}
6363

6464
return $this->createValidatorClosureForConstraint($constraint);
65-
break;
6665

6766
case 'SE':
6867
$constraint = new SwedenPostalCodeConstraint();
@@ -71,45 +70,36 @@ public function fetchValidatorForCountry($country, $message = null)
7170
}
7271

7372
return $this->createValidatorClosureForConstraint($constraint);
74-
break;
7573

7674
case 'DK':
7775
case 'BE':
7876
case 'NO';
7977
return $this->createValidatorClosureForConstraint($this->getFixedLengthDigitConstraint(4, $message));
80-
break;
8178

8279
case 'ES':
8380
case 'FI':
8481
case 'IT':
8582
case 'FR':
8683
case 'DE':
8784
return $this->createValidatorClosureForConstraint($this->getFixedLengthDigitConstraint(5, $message));
88-
break;
8985

9086
case 'NL':
9187
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{4}\s[A-Z]{2}$/'), $message));
92-
break;
9388

9489
case 'PL':
9590
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{2}\-\d{3}$/'), $message));
96-
break;
9791

9892
case 'PT':
9993
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{4}\-\d{3}$/'), $message));
100-
break;
10194

10295
case 'CA':
10396
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^[A-Z][0-9][A-Z] [0-9][A-Z][0-9]$/'), $message));
104-
break;
10597

10698
case 'US':
10799
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^[0-9]{5}$/', '/^[0-9]{5}\-[0-9]{4}$/'), $message));
108-
break;
109100

110101
default:
111102
return null;
112-
break;
113103
}
114104
}
115105

0 commit comments

Comments
 (0)