From 65525b93ebc48c2992271f435e1391bbb049367a Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Tue, 13 Apr 2021 14:44:21 +0200 Subject: [PATCH] Fix CS in IsbnValidator and IssnValidator --- Constraints/IsbnValidator.php | 3 +-- Constraints/IssnValidator.php | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Constraints/IsbnValidator.php b/Constraints/IsbnValidator.php index 5b59f3c7a..e0da13d7a 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.