Skip to content

Commit 04229f1

Browse files
authored
Add nullable to Preg::replaceCallbackStrictGroups (#22)
1 parent 5b16e25 commit 04229f1

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
@@ -203,7 +203,7 @@ public static function replaceCallback($pattern, callable $replacement, $subject
203203
*
204204
* @param-out int<0, max> $count
205205
*/
206-
public static function replaceCallbackStrictGroups(string $pattern, callable $replacement, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
206+
public static function replaceCallbackStrictGroups(string $pattern, callable $replacement, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
207207
{
208208
return self::replaceCallback($pattern, function (array $matches) use ($pattern, $replacement) {
209209
return $replacement(self::enforceNonNullMatches($pattern, $matches, 'replaceCallback'));

0 commit comments

Comments
 (0)