You are here

private function OutputFormatter::applyCurrentStyle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Formatter/OutputFormatter.php \Symfony\Component\Console\Formatter\OutputFormatter::applyCurrentStyle()

Applies current style from stack to text, if must be applied.

Parameters

string $text Input text:

Return value

string Styled text

1 call to OutputFormatter::applyCurrentStyle()
OutputFormatter::format in vendor/symfony/console/Formatter/OutputFormatter.php
Formats a message according to the given styles.

File

vendor/symfony/console/Formatter/OutputFormatter.php, line 222

Class

OutputFormatter
Formatter class for console output.

Namespace

Symfony\Component\Console\Formatter

Code

private function applyCurrentStyle($text) {
  return $this
    ->isDecorated() && strlen($text) > 0 ? $this->styleStack
    ->getCurrent()
    ->apply($text) : $text;
}