@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | /** @var int */ |
22 | 22 | protected $count; |
23 | 23 | |
24 | + /** |
|
25 | + * @param callable $replacement |
|
26 | + */ |
|
24 | 27 | public function __construct($pattern, $replacement, $subject, $result, int $count) |
25 | 28 | { |
26 | 29 | $this->pattern = $pattern; |
@@ -55,6 +58,10 @@ discard block |
||
55 | 58 | return new static($pattern, $replacement, $subject, $result, $count); |
56 | 59 | } |
57 | 60 | |
61 | + /** |
|
62 | + * @param string $replacement |
|
63 | + * @param integer $limit |
|
64 | + */ |
|
58 | 65 | protected static function doReplacement($pattern, $replacement, $subject, $limit): array |
59 | 66 | { |
60 | 67 | $count = 0; |
@@ -64,6 +71,9 @@ discard block |
||
64 | 71 | return [$result, $count]; |
65 | 72 | } |
66 | 73 | |
74 | + /** |
|
75 | + * @param integer $limit |
|
76 | + */ |
|
67 | 77 | protected static function doReplacementWithCallable($pattern, callable $replacement, $subject, $limit): array |
68 | 78 | { |
69 | 79 | $replacement = function (array $matches) use ($pattern, $subject, $replacement) { |