Skip to content

Commit

Permalink
Join PATTERN_2 and PATTERN_3
Browse files Browse the repository at this point in the history
  • Loading branch information
alphp committed Jun 7, 2024
1 parent fe16df6 commit ce6ce6d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/CountryHandler/Spain.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getTIN(): string

protected function hasValidPattern(string $tin): bool
{
return $this->isFollowPattern1($tin) || $this->isFollowPattern2($tin) || $this->isFollowPattern3($tin);
return $this->isFollowPattern1($tin) || $this->isFollowPattern2($tin);
}

protected function hasValidRule(string $tin): bool
Expand Down Expand Up @@ -130,11 +130,6 @@ private function isFollowPattern2(string $tin): bool
return $this->matchPattern($tin, self::PATTERN_2);
}

private function isFollowPattern3(string $tin): bool
{
return $this->matchPattern($tin, self::PATTERN_3);
}

private function isFollowRule1(string $tin): bool
{
if (1 !== preg_match('~' . self::PATTERN_1 . '~', strtoupper($tin), $tinParts)) {
Expand Down

0 comments on commit ce6ce6d

Please sign in to comment.