Skip to content

Commit 3de930c

Browse files
committed
Add conditional param-out to fix internal returns
1 parent 28fb502 commit 3de930c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Preg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ private static function enforceNonNullMatchAll(string $pattern, array $matches,
422422
* @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags
423423
* @return 0|1|false
424424
*
425-
* @param-out array<int|string, string|null> $matches
425+
* @param-out ($flags is PREG_OFFSET_CAPTURE ? array<int|string, array{string|null, int<-1, max>}> : array<int|string, string|null>) $matches
426426
*/
427427
private static function pregMatch(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0)
428428
{

0 commit comments

Comments
 (0)