Skip to content

Commit

Permalink
chore: fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 17, 2024
1 parent d3d6d55 commit a704934
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ TIN::fromSlug('be7110.2512345')->check(); // Not strict
TIN::fromSlug('be7110.2512345')->check(strict: false); // Not strict
TIN::fromSlug('be7110.2512345')->check(true); // Strict
TIN::fromSlug('be7110.2512345')->check(strict: true); // Strict

```

## Installation

Expand Down Expand Up @@ -145,4 +145,3 @@ Support our contributors by sponsoring them on [Github][github sponsors link].
https://img.shields.io/github/actions/workflow/status/loophp/tin/tests.yml?branch=master&style=flat-square
[github sponsors link]: https://github.com/loophp/tin/graphs/contributors
[github actions link]: https://github.com/loophp/tin/actions
```
5 changes: 3 additions & 2 deletions src/CountryHandler/Slovakia.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public function hasValidRule(string $tin): bool
protected function hasValidLength(string $tin): bool
{
$c1c2 = substr($tin, 0, 2);
$hasValidLength = parent::hasValidLength($tin);

if (54 > $c1c2) {
return $this->matchLength($tin, self::LENGTH) || $this->matchLength($tin, self::LENGTH - 1);
return $hasValidLength || $this->matchLength($tin, self::LENGTH - 1);
}

return parent::hasValidLength($tin);
return $hasValidLength;
}
}

0 comments on commit a704934

Please sign in to comment.