Skip to content

Commit 6c10c8d

Browse files
committed
Update PWZF validator: use GTIN-8 validator (formerly EAN-8)
1 parent 46acdc9 commit 6c10c8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Constraints/PwzfDigitsValidator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Czachor\PolishIdValidators\Constraints;
44

5-
use IsoCodes\Ean8;
5+
use IsoCodes\Gtin8;
66
use Symfony\Component\Validator\Constraint;
77
use Symfony\Component\Validator\ConstraintValidator;
88
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -64,7 +64,7 @@ public function validate($value, Constraint $constraint): void
6464
$this->value = $value;
6565

6666
$this->checkLocalChamberDigists();
67-
$this->validateEan8();
67+
$this->validateGtin8();
6868

6969
if ($this->is_error) {
7070
$this->context->buildViolation($constraint->message)
@@ -82,9 +82,9 @@ private function checkLocalChamberDigists(): void
8282
}
8383
}
8484

85-
private function validateEan8(): void
85+
private function validateGtin8(): void
8686
{
87-
if (!Ean8::check($this->value, 8)) {
87+
if (!Gtin8::check($this->value, 8)) {
8888
$this->is_error = false;
8989
}
9090
}

0 commit comments

Comments
 (0)