diff --git a/tests/PHPStanTests/nsrt/preg-match.php b/tests/PHPStanTests/nsrt/preg-match.php index 441d203..e9f7caf 100644 --- a/tests/PHPStanTests/nsrt/preg-match.php +++ b/tests/PHPStanTests/nsrt/preg-match.php @@ -28,12 +28,12 @@ function doMatch(string $s): void } assertType('array{}|array{0: string, 1?: string|null}', $matches); - if (Preg::isMatch('/Price: (?P£|€)\d+/', $s, $matches)) { - assertType('array{0: string, 1: string|null, currency: string|null}', $matches); + if (Preg::isMatch('/Price: (?£|€)\d+/', $s, $matches)) { + assertType('array{0: string, currency: string|null, 1: string|null}', $matches); } else { assertType('array{}', $matches); } - assertType('array{}|array{0: string, 1?: string|null}', $matches); + assertType('array{}|array{0: string, currency: string|null, 1: string|null}', $matches); } // disabled until https://github.com/phpstan/phpstan-src/pull/3185 can be resolved