Skip to content

Commit

Permalink
Fix build after RegexArrayShapeMatcher improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Jul 17, 2024
1 parent 5da3be5 commit 5f97dfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Type/Nette/data/strings-match.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ function (string $s): void {
assertType('array{string, string}|null', $result);

$result = Strings::match($s, '/(foo)(bar)(baz)/', PREG_OFFSET_CAPTURE);
assertType('array{array{string, int<0, max>}, array{string, int<0, max>}, array{string, int<0, max>}, array{string, int<0, max>}}|null', $result);
assertType('array{array{string, int<0, max>}, array{non-empty-string, int<0, max>}, array{non-empty-string, int<0, max>}, array{non-empty-string, int<0, max>}}|null', $result);

$result = Strings::match($s, '/(foo)(bar)(baz)/');
assertType('array{string, string, string, string}|null', $result);
assertType('array{string, non-empty-string, non-empty-string, non-empty-string}|null', $result);

$result = Strings::match($s, '/(foo)(bar)'. preg_quote($s) .'(baz)/');
assertType('array{string, string, string, string}|null', $result);
assertType('array{string, non-empty-string, non-empty-string, non-empty-string}|null', $result);
};

0 comments on commit 5f97dfa

Please sign in to comment.