/**
* {@inheritdoc}
*/
public function format($string, Style $style = null)
{
if (null !== $style) {
$this->innerFormatter->getStyleStack()->push(StyleConverter::convert($style));
}
$formatted = $this->innerFormatter->format($string);
if (null !== $style) {
$this->innerFormatter->getStyleStack()->pop();
}
return $formatted;
}