Add a genre

@param string $genre Genre
@return $this
@throws \InvalidArgumentException
352758
public function addGenre($genre)
    {
        if (is_null($genre)) {
            throw new \InvalidArgumentException('Genre cannot be null');
        }

        if (!is_string($genre)) {
            throw new \InvalidArgumentException('Genre must be string');
        }

        if (!in_array($genre, $this->genres)) {
            $this->genres[] = $genre;
        }

        return $this;
    }
192023
public function addType($type)
    {
        if (!in_array($type, $this->validTypes())) {
            throw new InvalidArgumentException(
                sprintf('Invalid cache type: "%s"', $type)
            );
        }

        $this->types[$type] = true;
        return $this;
    }
618164
public function setGenre(...$genre): self
    {
        $this->genre = array_unique(
            array_merge($genre, $this->genre)
        );


        return $this;
    }
724760
public function addCategories($categories)
    {
        $this->setProperty(
            'categories',
            'CATEGORIES' . $this->getCharsetString(),
            trim(implode(',', $categories))
        );

        return $this;
    }
440308
public function addCategorie(\Haven\CoreBundle\Entity\Category $categories)
    {
        $this->categories[] = $categories;
    
        return $this;
    }
1241549
public function add($category)
    {
        if (is_array($category)) {
            $this->collection[] = new Category($category);
        } elseif (is_object($category) && $category instanceof Category) {
            $this->collection[] = $category;
        }

        return $this;
    }
367074
public function addTerm(Term $term)
    {
        if (false === $this->hasTerm($term)) {
            $this->terms->add($term);
        }

        return $this;
    }
1075521
public function setGenres(array $genres)
    {
        $this->genres = array();

        foreach ($genres as $genre) {
            $this->addGenre($genre);
        }

        return $this;
    }
127949
public function addColumn(Column $column)
    {
        if (array_key_exists((string)$column, $this->columns)) {
            throw new \InvalidArgumentException("Column with label '$column' already exists!");
        }
        $this->columns[(string)$column] = $column;

        return $this;
    }
936463
public function setFileType($fileType)
    {
        if ($fileType == $this->fileType) return $this;
        if (!isset(self::getFileTypes()[$fileType])) {
            throw new \InvalidArgumentException(sprintf('"%s" is not a valid file type.', $fileType));
        }

        $this->fileType = $fileType;
        return $this;
    }
722801
protected function add($task) {
		if (is_string($task)) {
			$task = new $task($this->_config);
		}

		$class = get_class($task);
		if (!$task instanceof AbstractTask) {
			throw new InvalidArgumentException(
				"Cannot use '$class' as task, it is not implementing " . AbstractTask::class . '.'
			);
		}

		$this->tasks[$class] = $task;

		return $this;
	}
1364765
public function addType($type)
    {
        if ($type instanceof Type) {
            $type = $type->getName();
        }

        if (!\is_string($type)) {
            throw new InvalidException('Invalid type type');
        }

        $this->_types[] = $type;

        return $this;
    }
831365
public function add(MediaType $mediaType)
    {
        $this->mediaTypes[$mediaType->getName()] = $mediaType;

        foreach ($mediaType->getMimetypes() as $mimetype) {
            $this->mimetypeMap[$mimetype] = $mediaType->getName();
        }

        return $this;
    }
347679
def set_genre(self, genre):
        
        self._set_attr(TCON(encoding=3, text=str(genre)))
1084351
public function add($property)
    {
        if (!$property instanceof PropertyInterface) {
            throw new \InvalidArgumentException(
                'This Property must be a instance of \ClassGeneration\PropertyInterface'
            );
        }
        if ($property->getName() === null) {
            $property->setName('property' . ($this->count() + 1));
        }

        parent::set($property->getName(), $property);

        return true;
    }
1278533
public function addMessage($message, $type)
    {
        if (!is_string($message)) {
            throw new \InvalidArgumentException('Message must be a string');
        }
        if (!$message) {
            throw new \InvalidArgumentException('Message can\'t be empty');
        }
        if (!is_string($type)) {
            throw new \InvalidArgumentException('Type must be a string');
        }
        if (!$type) {
            throw new \InvalidArgumentException('Type can\'t be empty');
        }
        $this->messages[$type][] = $message;

        return $this;
    }
852365
public function add($middleware)
        {
            if (!is_string($middleware) && !$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException('Middleware must be a string or an instance of MiddlewareInterface');
            }

            $class = is_string($middleware) ? new $middleware : $middleware;
            array_push($this->middleware, $class);
        }