Merge pull request #839 from cerbero90/feature/compact-output

[2.x] Compact output when using datasets
This commit is contained in:
Nuno Maduro
2023-06-17 19:35:35 +01:00
committed by GitHub
2 changed files with 27 additions and 21 deletions

View File

@ -77,6 +77,12 @@ final class Exporter
*/
public function shortenedExport(mixed $value): string
{
return (string) preg_replace(['#\.{3}#', '#\\\n\s*#'], ['…'], $this->exporter->shortenedExport($value));
$map = [
'#\.{3}#' => '…',
'#\\\n\s*#' => '',
'# Object \(…\)#' => '',
];
return (string) preg_replace(array_keys($map), array_values($map), $this->exporter->shortenedExport($value));
}
}