public function setEnclosure(string $enclosure): self
    {
        if ($enclosure === $this->enclosure) {
            return $this;
        }

        if (1 === strlen($enclosure)) {
            $this->enclosure = $enclosure;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects enclosure to be a single character %s given', __METHOD__, $enclosure));
    }
public function setEnclosure(string $enclosure): self
    {
        if ($enclosure === $this->enclosure) {
            return $this;
        }

        if (1 === strlen($enclosure)) {
            $this->enclosure = $enclosure;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects enclosure to be a single character %s given', __METHOD__, $enclosure));
    }
public function setEnclosure ( string $ enclosure ) : self { if ( $ enclosure === $ this -> enclosure ) { return $ this ; } if ( 1 === strlen ( $ enclosure ) ) { $ this -> enclosure = $ enclosure ; $ this -> resetProperties ( ) ; return $ this ; } throw new Exception ( sprintf ( '%s() expects enclosure to be a single character %s given' , __METHOD__ , $ enclosure ) ) ; }
Sets the field enclosure.

@throws Exception If the Csv control character is not one character only.

@return static
Sets the field enclosure .