public function addTheme($name, $styles, bool $override = false): void
    {
        if (\array_key_exists($name, $this->themes) && false === $override) {
            throw new \RuntimeException('Theme [' . $name . '] is already set.');
        }
        
        $styles = $this->refineStyles($styles);

        foreach ($styles as $style) {
            if (!$this->isValid($style)) {
                throw new InvalidStyleException($style);
            }
        }
        $this->themes[$name] = $styles;
    }
public function addTheme($name, $styles, bool $override = false): void
    {
        if (\array_key_exists($name, $this->themes) && false === $override) {
            throw new \RuntimeException('Theme [' . $name . '] is already set.');
        }
        
        $styles = $this->refineStyles($styles);

        foreach ($styles as $style) {
            if (!$this->isValid($style)) {
                throw new InvalidStyleException($style);
            }
        }
        $this->themes[$name] = $styles;
    }
{@inheritdoc}