protected function formatMessage($message, $format = [Console::FG_RED, Console::BOLD])
    {
        $stream = Reaction::isConsoleApp() ? \STDERR : \STDOUT;
        // try controller first to allow check for --color switch
        if (Reaction::isConsoleApp() && Console::streamSupportsAnsiColors($stream)) {
            $message = Console::ansiFormat($message, $format);
        }

        return $message;
    }
protected function formatMessage($message, $format = [Console::FG_RED, Console::BOLD])
    {
        $stream = Reaction::isConsoleApp() ? \STDERR : \STDOUT;
        // try controller first to allow check for --color switch
        if (Reaction::isConsoleApp() && Console::streamSupportsAnsiColors($stream)) {
            $message = Console::ansiFormat($message, $format);
        }

        return $message;
    }
protected function formatMessage ( $ message , $ format = [ Console :: FG_RED , Console :: BOLD ] ) { $ stream = Reaction :: isConsoleApp ( ) ? \ STDERR : \ STDOUT ; // try controller first to allow check for --color switch if ( Reaction :: isConsoleApp ( ) && Console :: streamSupportsAnsiColors ( $ stream ) ) { $ message = Console :: ansiFormat ( $ message , $ format ) ; } return $ message ; }
Colorizes a message for console output.
@param string $message the message to colorize.
@param array $format the message format.
@return string the colorized message.
@see Console::ansiFormat() for details on how to specify the message format.
Colorizes a message for console output .