Adds the text to have a certain style

@param string $style The name of the text style
@throws InvalidArgumentException Thrown if the text style does not exist
488946
public function addTextStyle(string $style)
    {
        if (!isset(self::$supportedTextStyles[$style])) {
            throw new InvalidArgumentException("Invalid text style \"$style\"");
        }

        // Don't double-add a style
        if (!in_array($style, $this->textStyles)) {
            $this->textStyles[] = $style;
        }
    }
947456
public function addStyle($property, $style = null)
    {
        if (is_array($property) && is_null($style)) {
            foreach ($property as $k => $v) {
                $this->addStyle($k, $v);
            }

            return $this;
        }
        $this->template->append('style', ';'.$property.':'.$style);

        return $this;
    }
1020932
public function set_border($style) {
        $this->set_top($style);
        $this->set_bottom($style);
        $this->set_left($style);
        $this->set_right($style);
    }
1214633
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]);
        }
    }
346278
public function set_bottom($style) {
        if ($style == 1) {
            $this->format['borders']['bottom']['style'] = PHPExcel_Style_Border::BORDER_THIN;
        } else if ($style == 2) {
            $this->format['borders']['bottom']['style'] = PHPExcel_Style_Border::BORDER_THICK;
        } else {
            $this->format['borders']['bottom']['style'] = PHPExcel_Style_Border::BORDER_NONE;
        }
    }
749679
public function setStyle($style, $column1, $row1, $column2 = null, $row2 = null)
    {
        $this->sheet->getStyleByColumnAndRow($column1, $row1, $column2, $row2)->applyFromArray($style);
    }
616282
public function add(Style $style)
    {
        if (!$style->getTag()) {
            throw new LogicException('The tag of a style added to the style set must be set.');
        }

        $this->styles[$style->getTag()] = $style;
    }
422917
public function add($value)
    {
        if ( ! is_scalar($value)) {
            throw new InvalidArgumentException(sprintf(
                'Argument 1 passed to %s must be a scalar value, %s given',
                __METHOD__,
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        parent::offsetSet(null, $value);
    }
917588
public void add(T style)
    {
        Integer cnt = styles.get(style);
        if (cnt == null)
            styles.put(style, 1);
        else
            styles.put(style, cnt+1);
    }
166306
public final void setStyle(@NonNull final Style style) {
        Condition.INSTANCE.ensureNotNull(style, "The style may not be null");
        adapter.setStyle(style);
        adaptRootView();
        adaptTitleView();
        adaptContentView();
        adaptGridViewHeight();
    }
213228
public function add($constant)
    {
        if (!$constant instanceof ConstantInterface) {
            throw new \InvalidArgumentException(
                'This Constant must be a instance of \ClassGeneration\ConstantInterface'
            );
        }

        if ($constant->getName() === null) {
            $constant->setName('constant' . ($this->count() + 1));
        }

        return parent::add($constant);
    }
1010089
public function delStyle($style) {
        if ( ! empty($style)) {
            if ( ! is_array($style)) {
                $style = [$style];
            }
            if ( ! isset($this->obsolete['style'])) {
                $this->obsolete['style'] = [];
            }
            $this->obsolete['style'] = array_merge($this->obsolete['style'], $style);
        }
    }
37175
public function fetchStyle($style)
    {
        if (!in_array($style, [Sql::FETCH_ROW, Sql::FETCH_ASSOC, Sql::FETCH_RAW], true)) {
            throw new \Exception("Invalid fetch style specified");
        }
        $this->fetchStyle = $style;
    }
479532
public function addStyleId($styleId)
    {
        $styleId = (string)$styleId;
        if (!in_array($styleId, $this->styleIds)) {
            array_push($this->styleIds, $styleId);
        }
        return $this;
    }
566114
public function setStyle($style)
    {
        if (!is_string($style)) {
            $style = json_encode($style);
        }
        $this->entity->setStyle($style);

        return $this;
    }
626475
public function style($style)
    {
        if (is_array($style)) {
            $style = implode('', array_map(function ($key, $val) {
                return "$key:$val";
            }, array_keys($style), array_values($style)));
        }

        if (is_string($style)) {
            $this->attributes['style'] = $style;
        }
    }
158758
public function addRow(array $row, Style $style = null)
    {
        if (!empty($row)) {
            $style = $style instanceof Style ? $style : $this->styler->getDefaultStyle();
            $this->styler->addStyle($style);
            $this->sheetFile->fwrite($this->sheet->addRow($row, $style));
        }
    }