public function setAssets($assets): self
    {
        if (is_array($assets)) {
            $assets = new \ArrayIterator($assets);
        }
        if (!$assets instanceof \Traversable) {
            throw new \InvalidArgumentException('Assets must be an iterable array or object.');
        }
        $this->assets = $assets;

        return $this;
    }