Take shortcut when exporting a string

This commit is contained in:
Markus Staab 2024-06-17 16:39:40 +02:00 committed by Sebastian Bergmann
parent a2f0736101
commit 208c14fa3a
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ final readonly class Exporter
public function shortenedExport(mixed $value): string
{
if (is_string($value)) {
$string = str_replace("\n", '', $this->export($value));
$string = str_replace("\n", '', $this->exportString($value));
if (mb_strlen($string) > 40) {
return mb_substr($string, 0, 30) . '...' . mb_substr($string, -7);