src/Style/HtmlStyle.php
private function getStyle(array $token, array $previous): string
    {
        if (!empty($previous)) {
            foreach ($this->style as $style => $tokens) {
                if (in_array($previous[1] . $token[0], $tokens)) {
                    return $style;
                }
            }
        }

        foreach ($this->style as $style => $tokens) {
            if (in_array($token[0], $tokens)) {
                return $style;
            }
        }

        return '';
    }
private function getStyle(array $token, array $previous): string
    {
        if (!empty($previous)) {
            foreach ($this->style as $style => $tokens) {
                if (in_array($previous[1] . $token[0], $tokens)) {
                    return $style;
                }
            }
        }

        foreach ($this->style as $style => $tokens) {
            if (in_array($token[0], $tokens)) {
                return $style;
            }
        }

        return '';
    }
private function getStyle ( array $ token , array $ previous ) : string { if ( ! empty ( $ previous ) ) { foreach ( $ this -> style as $ style => $ tokens ) { if ( in_array ( $ previous [ 1 ] . $ token [ 0 ] , $ tokens ) ) { return $ style ; } } } foreach ( $ this -> style as $ style => $ tokens ) { if ( in_array ( $ token [ 0 ] , $ tokens ) ) { return $ style ; } } return '' ; }
Get styles for a given token.

@param array $token
@param array $previous
@return string
Get styles for a given token .