Skip to content

Commit

Permalink
chore: autofix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 6, 2024
1 parent ec2c3f1 commit 5f38f67
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion spec/loophp/Tin/CountryHandler/UnitedKingdomSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class UnitedKingdomSpec extends AbstractAlgorithmSpec
{
public const INVALID_NUMBER_LENGTH = [ 'wwwwwwww', '12345678901' ];
public const INVALID_NUMBER_LENGTH = ['wwwwwwww', '12345678901'];

public const INVALID_NUMBER_PATTERN = ['wwwwwwwww', 'GB123456A'];

Expand Down
18 changes: 9 additions & 9 deletions src/CountryHandler/CountryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,6 @@ protected function getLastDigit(int $number): int
return (int) end($split);
}

protected function normalizeTin(string $tin): string
{
if (null !== $string = preg_replace('#[^[:alnum:]\-+]#u', '', $tin)) {
return strtoupper($string);
}

return '';
}

protected function hasValidDate(string $tin): bool
{
return true;
Expand Down Expand Up @@ -153,4 +144,13 @@ protected function matchPattern(string $subject, string $pattern): bool
{
return 1 === preg_match(sprintf('/%s/', $pattern), $subject);
}

protected function normalizeTin(string $tin): string
{
if (null !== $string = preg_replace('#[^[:alnum:]\-+]#u', '', $tin)) {
return strtoupper($string);
}

return '';
}
}
2 changes: 1 addition & 1 deletion src/CountryHandler/UnitedKingdom.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace loophp\Tin\CountryHandler;

use function strlen;
use const STR_PAD_RIGHT;

/**
* United Kingdom.
Expand Down

0 comments on commit 5f38f67

Please sign in to comment.