src/Chalk.php
public static function style($string, $style)
    {
        $escapeSequence = ($style instanceof Style) ? $style->getEscapeSequence() : self::getEscapeSequence($style);
        $resetSequence = ($style instanceof Style) ? Style::getResetSequence() : self::getResetSequence($style);

        return $escapeSequence . $string . $resetSequence;
    }
public static function style($string, $style)
    {
        $escapeSequence = ($style instanceof Style) ? $style->getEscapeSequence() : self::getEscapeSequence($style);
        $resetSequence = ($style instanceof Style) ? Style::getResetSequence() : self::getResetSequence($style);

        return $escapeSequence . $string . $resetSequence;
    }
public static function style ( $ string , $ style ) { $ escapeSequence = ( $ style instanceof Style ) ? $ style -> getEscapeSequence ( ) : self :: getEscapeSequence ( $ style ) ; $ resetSequence = ( $ style instanceof Style ) ? Style :: getResetSequence ( ) : self :: getResetSequence ( $ style ) ; return $ escapeSequence . $ string . $ resetSequence ; }
Gives the given string the given style

@param  string $string
@param  int|Style    $style

@return string
Gives the given string the given style