public function setResizeFit(string $resizeFit = \null)
    {
        $validValues = ['pad', 'crop', 'fill', 'thumb', 'scale'];

        if (\null !== $resizeFit && !\in_array($resizeFit, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown resize fit "%s" given. Expected "%s" or null.',
                $resizeFit,
                \implode(', ', $validValues)
            ));
        }

        $this->resizeFit = $resizeFit;

        return $this;
    }