lib/Elastica/Query/Fuzzy.php
public function setField(string $fieldName, string $value): self
    {
        if (!\is_string($value) || !\is_string($fieldName)) {
            throw new InvalidException('The field and value arguments must be of type string.');
        }
        if (\count($this->getParams()) > 0 && \key($this->getParams()) !== $fieldName) {
            throw new InvalidException('Fuzzy query can only support a single field.');
        }

        return $this->setParam($fieldName, ['value' => $value]);
    }
public function setField(string $fieldName, string $value): self
    {
        if (!\is_string($value) || !\is_string($fieldName)) {
            throw new InvalidException('The field and value arguments must be of type string.');
        }
        if (\count($this->getParams()) > 0 && \key($this->getParams()) !== $fieldName) {
            throw new InvalidException('Fuzzy query can only support a single field.');
        }

        return $this->setParam($fieldName, ['value' => $value]);
    }
public function setField ( string $ fieldName , string $ value ) : self { if ( ! \ is_string ( $ value ) || ! \ is_string ( $ fieldName ) ) { throw new InvalidException ( 'The field and value arguments must be of type string.' ) ; } if ( \ count ( $ this -> getParams ( ) ) > 0 && \ key ( $ this -> getParams ( ) ) !== $ fieldName ) { throw new InvalidException ( 'Fuzzy query can only support a single field.' ) ; } return $ this -> setParam ( $ fieldName , [ 'value' => $ value ] ) ; }
Set field for fuzzy query.

@param string $fieldName Field name
@param string $value     String to search for

@return $this
Set field for fuzzy query .