mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
31 lines
687 B
PHP
31 lines
687 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Plugins\Parallel\Paratest;
|
|
|
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
|
|
|
final class CleanConsoleOutput extends ConsoleOutput
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function doWrite(string $message, bool $newline): void // @pest-arch-ignore-line
|
|
{
|
|
if ($this->isOpeningHeadline($message)) {
|
|
return;
|
|
}
|
|
|
|
parent::doWrite($message, $newline);
|
|
}
|
|
|
|
/**
|
|
* Removes the opening headline, witch is not needed.
|
|
*/
|
|
private function isOpeningHeadline(string $message): bool
|
|
{
|
|
return str_contains($message, 'by Sebastian Bergmann and contributors.');
|
|
}
|
|
}
|