public function removeTextStyle(string $style)
    {
        if (!isset(self::$supportedTextStyles[$style])) {
            throw new InvalidArgumentException("Invalid text style \"$style\"");
        }

        if (($index = array_search($style, $this->textStyles)) !== false) {
            unset($this->textStyles[$index]);
        }
    }
public function removeTextStyle(string $style)
    {
        if (!isset(self::$supportedTextStyles[$style])) {
            throw new InvalidArgumentException("Invalid text style \"$style\"");
        }

        if (($index = array_search($style, $this->textStyles)) !== false) {
            unset($this->textStyles[$index]);
        }
    }
public function removeTextStyle ( string $ style ) { if ( ! isset ( self :: $ supportedTextStyles [ $ style ] ) ) { throw new InvalidArgumentException ( "Invalid text style \"$style\"" ) ; } if ( ( $ index = array_search ( $ style , $ this -> textStyles ) ) !== false ) { unset ( $ this -> textStyles [ $ index ] ) ; } }
Removes a text style

@param string $style The style to remove
@throws InvalidArgumentException Thrown if the text style is invalid
Removes a text style