protected function computeHeader(array $header)
    {
        if ([] === $header) {
            $header = $this->getHeader();
        }

        if ($header === array_unique(array_filter($header, 'is_string'))) {
            return $header;
        }

        throw new Exception('The header record must be empty or a flat array with unique string values');
    }
protected function computeHeader(array $header)
    {
        if ([] === $header) {
            $header = $this->getHeader();
        }

        if ($header === array_unique(array_filter($header, 'is_string'))) {
            return $header;
        }

        throw new Exception('The header record must be empty or a flat array with unique string values');
    }
protected function computeHeader ( array $ header ) { if ( [ ] === $ header ) { $ header = $ this -> getHeader ( ) ; } if ( $ header === array_unique ( array_filter ( $ header , 'is_string' ) ) ) { return $ header ; } throw new Exception ( 'The header record must be empty or a flat array with unique string values' ) ; }
Returns the header to be used for iteration.

@param string[] $header

@throws Exception If the header contains non unique column name

@return string[]
Returns the header to be used for iteration .