protected function setHeader(int $offset): array
    {
        $header = $this->seekRow($offset);
        if (false === $header || [] === $header) {
            throw new Exception(sprintf('The header record does not exist or is empty at offset: `%s`', $offset));
        }

        if (0 === $offset) {
            return $this->removeBOM($header, mb_strlen($this->getInputBOM()), $this->enclosure);
        }

        return $header;
    }
protected function setHeader(int $offset): array
    {
        $header = $this->seekRow($offset);
        if (false === $header || [] === $header) {
            throw new Exception(sprintf('The header record does not exist or is empty at offset: `%s`', $offset));
        }

        if (0 === $offset) {
            return $this->removeBOM($header, mb_strlen($this->getInputBOM()), $this->enclosure);
        }

        return $header;
    }
protected function setHeader ( int $ offset ) : array { $ header = $ this -> seekRow ( $ offset ) ; if ( false === $ header || [ ] === $ header ) { throw new Exception ( sprintf ( 'The header record does not exist or is empty at offset: `%s`' , $ offset ) ) ; } if ( 0 === $ offset ) { return $ this -> removeBOM ( $ header , mb_strlen ( $ this -> getInputBOM ( ) ) , $ this -> enclosure ) ; } return $ header ; }
Determine the CSV record header.

@throws Exception If the header offset is set and no record is found or is the empty array

@return string[]
Determine the CSV record header .