mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
feat: compact console output by redacting object annotations
This commit is contained in:
@ -77,6 +77,12 @@ final class Exporter
|
|||||||
*/
|
*/
|
||||||
public function shortenedExport(mixed $value): string
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user