Skip to content

Commit

Permalink
Update YearMatch to include recent (and upcoming) years
Browse files Browse the repository at this point in the history
  • Loading branch information
mkopinsky committed Nov 21, 2024
1 parent 2761732 commit 603e015
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Matchers/YearMatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class YearMatch extends BaseMatch
public static function match(string $password, array $userInputs = []): array
{
$matches = [];
$groups = static::findAll($password, "/(19\d\d|200\d|201\d)/u");
$groups = static::findAll($password, "/(19\d\d|20\d\d)/u");
foreach ($groups as $captures) {
$matches[] = new static($password, $captures[1]['begin'], $captures[1]['end'], $captures[1]['token']);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Matchers/YearTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function nonRecentYearProvider()
return [
['1420'],
['1899'],
['2020']
['2345']
];
}

Expand Down

0 comments on commit 603e015

Please sign in to comment.