Skip to content

Commit

Permalink
Add conditional param-out to fix internal returns
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Mar 15, 2024
1 parent 28fb502 commit 3de930c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Preg.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ private static function enforceNonNullMatchAll(string $pattern, array $matches,
* @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags
* @return 0|1|false
*
* @param-out array<int|string, string|null> $matches
* @param-out ($flags is PREG_OFFSET_CAPTURE ? array<int|string, array{string|null, int<-1, max>}> : array<int|string, string|null>) $matches
*/
private static function pregMatch(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0)
{
Expand Down

0 comments on commit 3de930c

Please sign in to comment.