Skip to content

Commit

Permalink
Merge branch '2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Mar 19, 2024
2 parents 4775f35 + 540af38 commit 5b16e25
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
php-version:
- "7.4"
- "8.1"
- "8.3"

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
php-version:
- "7.4"
- "8.1"
- "8.3"

steps:
- name: "Checkout"
Expand Down
17 changes: 1 addition & 16 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ parameters:
path: src/Preg.php

-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:match\\(\\) 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\\.$#"
count: 1
path: src/Preg.php

-
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\\.$#"
count: 1
path: src/Preg.php

-
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\\.$#"
count: 1
path: src/Preg.php

-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchWithOffsets\\(\\) expects array\\<int\\|string, array\\{string\\|null, int\\<\\-1, max\\>\\}\\>, \\(768 is 256 \\? array\\<array\\{string, int\\<\\-1, max\\>\\}\\> \\: \\(768 is 512 \\? array\\<string\\|null\\> \\: \\(768 is 768 \\? array\\<array\\{null, \\-1\\}\\|array\\{string, int\\<0, max\\>\\}\\> \\: array\\<string\\>\\)\\)\\) given\\.$#"
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAllWithOffsets\\(\\) expects array\\<int\\|string, list\\<array\\{string\\|null, int\\<\\-1, max\\>\\}\\>\\>, array given\\.$#"
count: 1
path: src/Preg.php
6 changes: 3 additions & 3 deletions src/Preg.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static function matchAllWithOffsets(string $pattern, string $subject, ?ar
*
* @param-out int<0, max> $count
*/
public static function replace($pattern, $replacement, $subject, int $limit = -1, int &$count = null): string
public static function replace($pattern, $replacement, $subject, int $limit = -1, ?int &$count = null): string
{
if (!is_scalar($subject)) {
if (is_array($subject)) {
Expand All @@ -174,7 +174,7 @@ public static function replace($pattern, $replacement, $subject, int $limit = -1
*
* @param-out int<0, max> $count
*/
public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
{
if (!is_scalar($subject)) {
if (is_array($subject)) {
Expand Down Expand Up @@ -218,7 +218,7 @@ public static function replaceCallbackStrictGroups(string $pattern, callable $re
*
* @param-out int<0, max> $count
*/
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
{
if (!is_scalar($subject)) {
if (is_array($subject)) {
Expand Down

0 comments on commit 5b16e25

Please sign in to comment.