public function variantEnd(Variant $variant)
{
$this->resetLinePosition();
$this->drawIterations($variant, [], null);
if ($variant->hasErrorStack()) {
$this->output->write(' <error>ERROR</error>');
$this->output->write("[0J");
// clear the rest of the line
$this->output->write(PHP_EOL);
return;
}
$this->rejects = [];
foreach ($variant->getRejects() as $reject) {
$this->rejects[$reject->getIndex()] = true;
}
if ($this->rejects) {
$this->resetLinePosition();
return;
}
$this->output->write(sprintf(' <comment>%s</comment>', $this->formatIterationsShortSummary($variant)));
$this->output->write(PHP_EOL);
}