= OutputInterface::VERBOSITY_VERBOSE;
Daux::write($title, $verbose);
// 8 is the length of the label + 2 let it breathe
$padding = $width - $this->getLength($title) - 10;
try {
$response = $closure(function($content) use (&$padding, $verbose) {
$padding -= $this->getLength($content);
Daux::write($content, $verbose);
});
} catch (\Exception $e) {
$this->status($padding, '[ FAIL ]');
throw $e;
}
$this->status($padding, '[ OK ]');
return $response;
}
protected function status($padding, $content)
{
$verbose = Daux::getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE;
$padding = $verbose ? '' : str_pad(' ', $padding);
Daux::writeln($padding . $content);
}
}