From 4f69067ab9149eecdf3e18e7f5431a23da184624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Wed, 15 May 2024 22:14:36 +0200 Subject: [PATCH] chore: update PHPDoc in `Preg::matchAll` (#8012) --- dev-tools/phpstan/baseline.php | 6 ------ src/Preg.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/dev-tools/phpstan/baseline.php b/dev-tools/phpstan/baseline.php index 1fa9aeb45cc..9413046255b 100644 --- a/dev-tools/phpstan/baseline.php +++ b/dev-tools/phpstan/baseline.php @@ -841,12 +841,6 @@ 'count' => 1, 'path' => __DIR__ . '/../../src/Linter/ProcessLinter.php', ]; -$ignoreErrors[] = [ - // identifier: missingType.iterableValue - 'message' => '#^Method PhpCsFixer\\\\Preg\\:\\:matchAll\\(\\) has @param\\-out PHPDoc tag for parameter \\$matches with no value type specified in iterable type array\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/../../src/Preg.php', -]; $ignoreErrors[] = [ // identifier: return.type 'message' => '#^Method PhpCsFixer\\\\Preg\\:\\:replace\\(\\) should return string but returns array\\\\|string\\.$#', diff --git a/src/Preg.php b/src/Preg.php index 7b040d367c0..48b7e8305dc 100644 --- a/src/Preg.php +++ b/src/Preg.php @@ -74,7 +74,7 @@ public static function match(string $pattern, string $subject, ?array &$matches * ? list> * : ($flags is int-mask&770 * ? list> - * : array + * : ($flags is 0 ? array> : array) * ) * ) * )