diff --git a/Constraints/IsbnValidator.php b/Constraints/IsbnValidator.php index e8e54eb63..786710049 100644 --- a/Constraints/IsbnValidator.php +++ b/Constraints/IsbnValidator.php @@ -163,8 +163,7 @@ protected function validateIsbn13($isbn) } for ($i = 1; $i < 12; $i += 2) { - $checkSum += $isbn[$i] - * 3; + $checkSum += $isbn[$i] * 3; } return 0 === $checkSum % 10 ? true : Isbn::CHECKSUM_FAILED_ERROR; diff --git a/Constraints/IssnValidator.php b/Constraints/IssnValidator.php index 8766b077b..aa83201cd 100644 --- a/Constraints/IssnValidator.php +++ b/Constraints/IssnValidator.php @@ -114,10 +114,7 @@ public function validate($value, Constraint $constraint) } // Calculate a checksum. "X" equals 10. - $checkSum = 'X' === $canonical[7] - || 'x' === $canonical[7] - ? 10 - : $canonical[7]; + $checkSum = 'X' === $canonical[7] || 'x' === $canonical[7] ? 10 : $canonical[7]; for ($i = 0; $i < 7; ++$i) { // Multiply the first digit by 8, the second by 7, etc.