Sets the size of our icon.
Sizes are 'large', '2x', '3x' and '4x'. All other sizes will throw an error

@param string $size

@throws IconException

@return Icon
321041
public function setSize(string $size): Icon
    {
        // sizes which are allowed
        $sizes = [
            'lg',
            '2x',
            '3x',
            '4x'
        ];

        if (!in_array($size, $sizes)) {
            Throw new IconException('Wrong size set.');
        }

        $this->size = $size;

        return $this;
    }
637446
public function setIcon(?string $icon): self
    {
        if (null === $icon) {
            $this->icon = $this->iconType = null;

            return $this;
        }

        if (':' === \mb_substr($icon, 0, 1) && ':' === \mb_substr($icon, \mb_strlen($icon) - 1, 1)) {
            $this->iconType = self::ICON_TYPE_EMOJI;
        } else {
            $this->iconType = self::ICON_TYPE_URL;
        }

        $this->icon = $icon;

        return $this;
    }
136573
public function setFontSize(int $size): PdfInterface
    {
        $this->fontSize = (int) $size;
        $this->mpdf->SetDefaultFontSize($this->fontSize);

        return $this;
    }
360854
public function setSize(WebDriverDimension $size)
    {
        $params = [
            'width' => $size->getWidth(),
            'height' => $size->getHeight(),
            ':windowHandle' => 'current',
        ];
        $this->executor->execute(DriverCommand::SET_WINDOW_SIZE, $params);

        return $this;
    }
438244
public function setIcon( $icon = null ) {
		if ( $this->iconName !== null ) {
			$this->icon->removeClasses( [ 'oo-ui-icon-' . $this->iconName ] );
		}
		if ( $icon !== null ) {
			$this->icon->addClasses( [ 'oo-ui-icon-' . $icon ] );
		}

		$this->iconName = $icon;
		$this->toggleClasses( [ 'oo-ui-iconElement' ], (bool)$this->iconName );
		$this->icon->toggleClasses( [ 'oo-ui-iconElement-noIcon' ], !$this->iconName );

		return $this;
	}
944012
public function setIcon($icon)
    {
        switch ($icon) {
            case 'info':
            case 'error':
            case 'warning':
                $this->icon = $icon;
                break;
            default:
                if (file_exists($icon) && is_file($icon)) {
                    $this->icon = $icon;
                } else {
                    if (isset($this->log)) {
                        $this->log(
                            sprintf(
                                "%s is not a file. Using default icon instead.",
                                $icon
                            ),
                            Project::MSG_WARN
                        );
                    }
                }
        }
    }
1302524
public function setBlockSize($size)
    {
        if ($size <= 1) {
            throw new \InvalidArgumentException("Pixel Size Must Be Greater Than One");
        }
        $this->size = (int) abs($size);

        return $this;
    }
1373668
public function setSize($size)
	{
		$this->size = $size;
		$this->pixelRatio = round($size / 5);

		return $this;
	}
1095636
public function setCacheSize($size)
    {
        $this->cacheSize = $size;
        $this->logger->debug('LRUcache: set size: ' . $size );
        return true;
    }
610063
public function sm(int $size): Bootstrap4Column
    {
        if ($this->validateColumnSize($size) === true) {
            $this->sm_size = $size;
        }

        return $this;
    }
461881
public function setIcon($icon) {
		if (isset($this->_icon)) {
			$this->removePropertyValue("class", $this->_icon);
		}
		$this->_icon=$icon;
		$this->addToProperty("class", $icon);
		return $this;
	}
811607
public function setSize($size): Input
    {
        if (empty((int) $size)) {
            Throw new FormException('A html form inputs size needs to be an integer.');
        }

        $this->attribute['size'] = $size;

        return $this;
    }
897628
public function setSize($size)
    {
        if (!is_numeric($size) || $size < 1) {
            throw new \InvalidArgumentException(
                "An invalid identicon size was specified. ".
                "A numeric value >= 1 was expected. Specified value: $size.");
        }
        
        $this->size = (int)$size;
    }
1073997
public function getThumbUrl($size = 'thumb')
    {
        $url = $this->package->config('icons.url');
        $icons = $this->package->config('icons.files');

        if (!$this->metadata->isFile()) {
            return $url . $icons['dir'];
        }

        if ($this->isImage()) {
            $thumbs = $this->getThumbsDetails();

            if (!array_key_exists($size, $thumbs)) {
                return $url . $icons['img'];
            }

            return $thumbs[$size]['url'];
        }

        $mime = $this->getMime();
        if (!array_key_exists($mime, $icons)) {
            $message = sprintf('Configuration file is missing for `%s` file type in `icons.files` array', $mime);
            throw new \Exception($message);
        }

        return $url . $icons[$mime];
    }
89461
public function size($size)
    {
        if (!$this->isValidSize($size)) {
            throw new AudioPlayerException('Invalid Size');
        }
        $this->size = $size;

        // Progress Bar & Time Code can not be used with Tiny/Invisible
        // Any other size (Small, Medium, Large) MUST have a Progress Bar
        if ($size == static::SIZE_TINY || $size == static::SIZE_INVISIBLE) {
            $this->progressBar(false)->timeCode(false);
        } else {
            $this->progressBar();
        }

        return $this;
    }
184155
public function setIcon($icon)
    {
        $this->icon = $this->factory->create('Fontawesome\Icon');
        $this->icon->setIcon($icon);

        return $this;
    }
1217544
public function floatRight($size = null)
    {
        if (empty($size)) {
            $this->attributes->addAttributeClass('float-right');
        } elseif (in_array($size, ['xs', 'sm', 'md', 'lg', 'xl'])) {
            $this->attributes->addAttributeClass('float-' . $size . '-right');
        }

        return $this;
    }