lib/Elastica/Suggest/AbstractSuggest.php
public function setName(string $name): AbstractSuggest
    {
        if (empty($name)) {
            throw new InvalidException('Suggest name has to be set');
        }
        $this->_name = $name;

        return $this;
    }
public function setName(string $name): AbstractSuggest
    {
        if (empty($name)) {
            throw new InvalidException('Suggest name has to be set');
        }
        $this->_name = $name;

        return $this;
    }
public function setName ( string $ name ) : AbstractSuggest { if ( empty ( $ name ) ) { throw new InvalidException ( 'Suggest name has to be set' ) ; } $ this -> _name = $ name ; return $ this ; }
Sets the name of the suggest. It is automatically set by
the constructor.

@param string $name The name of the suggest

@throws InvalidException If name is empty

@return $this
Sets the name of the suggest . It is automatically set by the constructor .