Skip to content

Commit 603e015

Browse files
committed
Update YearMatch to include recent (and upcoming) years
1 parent 2761732 commit 603e015

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Matchers/YearMatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class YearMatch extends BaseMatch
2323
public static function match(string $password, array $userInputs = []): array
2424
{
2525
$matches = [];
26-
$groups = static::findAll($password, "/(19\d\d|200\d|201\d)/u");
26+
$groups = static::findAll($password, "/(19\d\d|20\d\d)/u");
2727
foreach ($groups as $captures) {
2828
$matches[] = new static($password, $captures[1]['begin'], $captures[1]['end'], $captures[1]['token']);
2929
}

test/Matchers/YearTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function nonRecentYearProvider()
4848
return [
4949
['1420'],
5050
['1899'],
51-
['2020']
51+
['2345']
5252
];
5353
}
5454

0 commit comments

Comments
 (0)