You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,31 @@ parameters:
11
11
path:src/Preg.php
12
12
13
13
-
14
-
message:"#^Offset 0 does not exist on string\\|null\\.$#"
14
+
message:"#^Parameter \\#2 \\$callback of function preg_replace_callback expects callable\\(array\\<int\\|string, string\\>\\)\\: string, \\(callable\\(array\\<int\\|string, array\\{string\\|null, int\\<\\-1, max\\>\\}\\>\\)\\: string\\)\\|\\(callable\\(array\\<int\\|string, string\\|null\\>\\)\\: string\\) given\\.$#"
15
+
count:2
16
+
path:src/Preg.php
17
+
18
+
-
19
+
message:"#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAll\\(\\) expects array\\<int\\|string, list\\<string\\|null\\>\\>, \\(512 is 1 \\? array\\<list\\<string\\>\\> \\: \\(512 is 2 \\? list\\<array\\<string\\>\\> \\: \\(512 is 256\\|257 \\? array\\<list\\<array\\{string, int\\}\\>\\> \\: \\(512 is 258 \\? list\\<array\\<array\\{string, int\\}\\>\\> \\: \\(512 is 512\\|513 \\? array\\<list\\<string\\|null\\>\\> \\: \\(512 is 514 \\? list\\<array\\<string\\|null\\>\\> \\: \\(512 is 770 \\? list\\<array\\<array\\{string\\|null, int\\}\\>\\> \\: array\\)\\)\\)\\)\\)\\)\\) given\\.$#"
20
+
count:1
21
+
path:src/Preg.php
22
+
23
+
-
24
+
message:"#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAllWithOffsets\\(\\) expects array\\<int\\|string, list\\<array\\{string\\|null, int\\<\\-1, max\\>\\}\\>\\>, \\(768 is 1 \\? array\\<list\\<string\\>\\> \\: \\(768 is 2 \\? list\\<array\\<string\\>\\> \\: \\(768 is 256\\|257 \\? array\\<list\\<array\\{string, int\\}\\>\\> \\: \\(768 is 258 \\? list\\<array\\<array\\{string, int\\}\\>\\> \\: \\(768 is 512\\|513 \\? array\\<list\\<string\\|null\\>\\> \\: \\(768 is 514 \\? list\\<array\\<string\\|null\\>\\> \\: \\(768 is 770 \\? list\\<array\\<array\\{string\\|null, int\\}\\>\\> \\: array\\)\\)\\)\\)\\)\\)\\) given\\.$#"
25
+
count:1
26
+
path:src/Preg.php
27
+
28
+
-
29
+
message:"#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchWithOffsets\\(\\) expects array\\<int\\|string, array\\{string\\|null, int\\<\\-1, max\\>\\}\\>, array\\<int\\|string, string\\|null\\> given\\.$#"
30
+
count:1
31
+
path:src/Preg.php
32
+
33
+
-
34
+
message:"#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:pregMatch\\(\\) expects array\\<int\\|string, string\\|null\\>, \\(int is int \\? array\\<array\\<int, int\\<\\-1, max\\>\\|string\\>\\> \\: \\(int is int \\? array\\<string\\|null\\> \\: \\(int is int \\? array\\<array\\<int, int\\|string\\|null\\>\\> \\: array\\<string\\>\\)\\)\\) given\\.$#"
15
35
count:1
16
-
path:tests/PregTests/ReplaceCallbackTest.php
36
+
path:src/Preg.php
37
+
38
+
-
39
+
message:"#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:pregMatch\\(\\) expects array\\<int\\|string, string\\|null\\>, array given\\.$#"
Copy file name to clipboardExpand all lines: src/Preg.php
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ class Preg
20
20
21
21
/**
22
22
* @param non-empty-string $pattern
23
-
* @param array<string|null> $matches Set by method
23
+
* @param array<mixed> $matches Set by method
24
24
* @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
25
25
* @return 0|1
26
26
*
@@ -42,7 +42,7 @@ public static function match(string $pattern, string $subject, ?array &$matches
42
42
* Variant of `match()` which outputs non-null matches (or throws)
43
43
*
44
44
* @param non-empty-string $pattern
45
-
* @param array<string> $matches Set by method
45
+
* @param array<mixed> $matches Set by method
46
46
* @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
47
47
* @return 0|1
48
48
* @throws UnexpectedNullMatchException
@@ -61,7 +61,7 @@ public static function matchStrictGroups(string $pattern, string $subject, ?arra
61
61
* Runs preg_match with PREG_OFFSET_CAPTURE
62
62
*
63
63
* @param non-empty-string $pattern
64
-
* @param array<int|string, array{string|null, int}> $matches Set by method
64
+
* @param array<mixed> $matches Set by method
65
65
* @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_OFFSET_CAPTURE are always set, no other flags are supported
66
66
* @return 0|1
67
67
*
@@ -79,7 +79,7 @@ public static function matchWithOffsets(string $pattern, string $subject, ?array
79
79
80
80
/**
81
81
* @param non-empty-string $pattern
82
-
* @param array<int|string, list<string|null>> $matches Set by method
82
+
* @param array<mixed> $matches Set by method
83
83
* @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
84
84
* @return 0|positive-int
85
85
*
@@ -102,7 +102,7 @@ public static function matchAll(string $pattern, string $subject, ?array &$match
102
102
* Variant of `match()` which outputs non-null matches (or throws)
103
103
*
104
104
* @param non-empty-string $pattern
105
-
* @param array<int|string, list<string|null>> $matches Set by method
105
+
* @param array<mixed> $matches Set by method
106
106
* @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
107
107
* @return 0|positive-int
108
108
* @throws UnexpectedNullMatchException
@@ -121,7 +121,7 @@ public static function matchAllStrictGroups(string $pattern, string $subject, ?a
121
121
* Runs preg_match_all with PREG_OFFSET_CAPTURE
122
122
*
123
123
* @param non-empty-string $pattern
124
-
* @param array<int|string, list<array{string|null, int}>> $matches Set by method
124
+
* @param array<mixed> $matches Set by method
125
125
* @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported
126
126
* @return 0|positive-int
127
127
*
@@ -167,7 +167,7 @@ public static function replace($pattern, $replacement, $subject, int $limit = -1
0 commit comments