This commit is contained in:
Markus Staab 2024-06-17 14:20:28 +02:00 committed by Sebastian Bergmann
parent f0a267833b
commit ec1990caf8
2 changed files with 4 additions and 1 deletions

View File

@ -71,11 +71,13 @@ final readonly class Exporter
/* @noinspection UnusedFunctionResultInspection */
$processed->add($data);
$i = 0;
$i = 0;
$count = count($data, COUNT_RECURSIVE);
foreach ($array as $key => $value) {
if ($count > self::MAX_SHORTENED_ITEMS && $i > self::MAX_SHORTENED_ITEMS) {
$result[] = sprintf('...%d more elements', $count - 10);
break;
}

View File

@ -322,6 +322,7 @@ EOF,
public static function shortenedRecursiveExportProvider(): array
{
$bigArray = [];
for ($i = 0; $i < 20_000; $i++) {
$bigArray[] = 'cast(\'foo' . $i . '\' as blob)';
}