public function setName(string $name): self
    {
        if (empty($name)) {
            throw new \InvalidArgumentException("Group name can not be empty");
        }
        $this->name = $name;
        return $this;
    }
public function setName(string $name): self
    {
        if (empty($name)) {
            throw new \InvalidArgumentException("Group name can not be empty");
        }
        $this->name = $name;
        return $this;
    }
public function setName ( string $ name ) : self { if ( empty ( $ name ) ) { throw new \ InvalidArgumentException ( "Group name can not be empty" ) ; } $ this -> name = $ name ; return $ this ; }
Sets the Group's name to the given string.
@param string $name Name that the Group should have.
@return self
@throws \InvalidArgumentException When $name is empty.
Sets the Group s name to the given string .