Skip to content

Commit b9f23e8

Browse files
committed
Update preg_match_shapes.php
1 parent 8cd11e4 commit b9f23e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/PHPStan/Analyser/nsrt/preg_match_shapes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ function (string $value): void
652652

653653
function (string $value): void {
654654
if (preg_match('/^(?:(x)|(y))*$/', $value, $matches, PREG_OFFSET_CAPTURE)) {
655-
assertType("array{0: array{string, int<-1, max>}, 1?: array{non-empty-string, int<-1, max>}, 2?: array{non-empty-string, int<-1, max>}}", $matches);
655+
assertType("array{0: array{string, int<-1, max>}, 1?: array{non-empty-string, int<-1, max>}}|array{array{string, int<-1, max>}, array{'', int<-1, max>}, array{non-empty-string, int<-1, max>}}", $matches);
656656
}
657657
};
658658

@@ -691,7 +691,7 @@ function (string $s): void {
691691

692692
function (string $s): void {
693693
if (preg_match('~a|(\d)|(\s)~', $s, $matches, PREG_OFFSET_CAPTURE) === 1) {
694-
assertType("array{0: array{string, int<0, max>}, 1?: array{numeric-string, int<0, max>}}|array{array{string, int<0, max>}, array{'', int<0, max>}, array{non-empty-string, int<0, max>}}", $matches);
694+
assertType("array{0: array{string, int<-1, max>}, 1?: array{numeric-string, int<-1, max>}}|array{array{string, int<-1, max>}, array{'', int<-1, max>}, array{non-empty-string, int<-1, max>}}", $matches);
695695
}
696696
};
697697

0 commit comments

Comments
 (0)