src/Reader.php
/**
     * Read the current row and convert them to UTF-8 and moves the pointer to the next Record
     * Skip empty lines if it is set
     *
     * @return null|array
     * @throws CsvException
     */
Read the current row and convert them to UTF-8 and moves the pointer to the next Record
Skip empty lines if it is set

@return null|array
@throws CsvException
Read the current row and convert them to UTF - 8 and moves the pointer to the next Record Skip empty lines if it is set @return null|array @throws CsvException
public function readRecord(): ?array
    {
        $this->skipLeadingLines();
        $this->headerRead();
        $this->currentRecord = $this->current();
        if (false === $this->currentRecord) {
            throw CsvException::readError(error_get_last()['message'] ?? null);
        }
        if ($this->valid()) {
            if ($this->getStrategy()->doSkipEmptyLines()) {
                while (null !== $this->currentRecord && [] === array_filter($this->currentRecord)) {
                    $this->readRecord();
                }
            }
            if ($this->getStrategy()->hasHeader() && $this->getStrategy()->asAssociative()) {
                $this->currentRecord = array_combine($this->getHeader(), $this->currentRecord);
            }
            $this->next();
            return $this->convertRowToUtf8($this->currentRecord);
        }
        return null;
    }
public function readRecord ( ) : ? array { $ this -> skipLeadingLines ( ) ; $ this -> headerRead ( ) ; $ this -> currentRecord = $ this -> current ( ) ; if ( false === $ this -> currentRecord ) { throw CsvException :: readError ( error_get_last ( ) [ 'message' ] ?? null ) ; } if ( $ this -> valid ( ) ) { if ( $ this -> getStrategy ( ) -> doSkipEmptyLines ( ) ) { while ( null !== $ this -> currentRecord && [ ] === array_filter ( $ this -> currentRecord ) ) { $ this -> readRecord ( ) ; } } if ( $ this -> getStrategy ( ) -> hasHeader ( ) && $ this -> getStrategy ( ) -> asAssociative ( ) ) { $ this -> currentRecord = array_combine ( $ this -> getHeader ( ) , $ this -> currentRecord ) ; } $ this -> next ( ) ; return $ this -> convertRowToUtf8 ( $ this -> currentRecord ) ; } return null ; }
Read the current row and convert them to UTF-8 and moves the pointer to the next Record
 Skip empty lines if it is set
Read the current row and convert them to UTF - 8 and moves the pointer to the next Record Skip empty lines if it is set