Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Preg.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
throw PcreException::fromFunction('preg_split', $pattern);
}

return $result;

Check failure on line 255 in src/Preg.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4)

Method Composer\Pcre\Preg::split() should return list<string> but returns list<array{string, int<0, max>}|string>.

Check failure on line 255 in src/Preg.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Method Composer\Pcre\Preg::split() should return list<string> but returns list<array{string, int<0, max>}|string>.
}

/**
Expand Down Expand Up @@ -395,7 +395,7 @@
* @return array<int|string, string>
* @throws UnexpectedNullMatchException
*/
private static function enforceNonNullMatches(string $pattern, array $matches, string $variantMethod)
private static function enforceNonNullMatches(string $pattern, array $matches, string $variantMethod): array
{
foreach ($matches as $group => $match) {
if (is_string($match) || (is_array($match) && is_string($match[0]))) {
Expand All @@ -414,7 +414,7 @@
* @return array<int|string, list<string>>
* @throws UnexpectedNullMatchException
*/
private static function enforceNonNullMatchAll(string $pattern, array $matches, string $variantMethod)
private static function enforceNonNullMatchAll(string $pattern, array $matches, string $variantMethod): array
{
foreach ($matches as $group => $groupMatches) {
foreach ($groupMatches as $match) {
Expand Down
Loading