private function readData($data)
    {
        $this->line('Processing...');
        $this->line('');

        $reader = Reader::createFromString($data);

        // Apply any filters.
        if (array_has($this->config, 'filter')) {
            $reader = $this->config['filter']($reader);
        }

        if (!array_has($this->config, 'no_header', false)) {
            $reader->setHeaderOffset(0);
        }

        $result = [];
        $this->progress_bar = $this->output->createProgressBar(1);

        foreach ($reader as $row) {
            if (count($row = $this->processRow($row))) {
                $result[] = $row;
            }
            $this->progress_bar->advance();
        }

        // Apply any filters.
        if (array_has($this->config, 'change_read_data')) {
            $result = $this->config['change_read_data']($result);
        }

        $this->line('     ');
        $this->line('     ');

        return $result;
    }
private function readData($data)
    {
        $this->line('Processing...');
        $this->line('');

        $reader = Reader::createFromString($data);

        // Apply any filters.
        if (array_has($this->config, 'filter')) {
            $reader = $this->config['filter']($reader);
        }

        if (!array_has($this->config, 'no_header', false)) {
            $reader->setHeaderOffset(0);
        }

        $result = [];
        $this->progress_bar = $this->output->createProgressBar(1);

        foreach ($reader as $row) {
            if (count($row = $this->processRow($row))) {
                $result[] = $row;
            }
            $this->progress_bar->advance();
        }

        // Apply any filters.
        if (array_has($this->config, 'change_read_data')) {
            $result = $this->config['change_read_data']($result);
        }

        $this->line('     ');
        $this->line('     ');

        return $result;
    }
private function readData ( $ data ) { $ this -> line ( 'Processing...' ) ; $ this -> line ( '' ) ; $ reader = Reader :: createFromString ( $ data ) ; // Apply any filters. if ( array_has ( $ this -> config , 'filter' ) ) { $ reader = $ this -> config [ 'filter' ] ( $ reader ) ; } if ( ! array_has ( $ this -> config , 'no_header' , false ) ) { $ reader -> setHeaderOffset ( 0 ) ; } $ result = [ ] ; $ this -> progress_bar = $ this -> output -> createProgressBar ( 1 ) ; foreach ( $ reader as $ row ) { if ( count ( $ row = $ this -> processRow ( $ row ) ) ) { $ result [ ] = $ row ; } $ this -> progress_bar -> advance ( ) ; } // Apply any filters. if ( array_has ( $ this -> config , 'change_read_data' ) ) { $ result = $ this -> config [ 'change_read_data' ] ( $ result ) ; } $ this -> line ( '     ' ) ; $ this -> line ( '     ' ) ; return $ result ; }
Read the data and do our mapping.

@param string $data

@return array

@SuppressWarnings(PHPMD.CyclomaticComplexity)
Read the data and do our mapping .