Read and return the next line from the file.

@param array $data
4960
public function printLine($data)
    {
        if (!is_array($data)) {
            throw new \RuntimeException("can not write CSV data. supplied data is not an array.");
        }
        fputcsv($this->handle, $data, $this->delimiter, $this->enclosure, $this->escape);
        ++$this->lineNumber;
    }
859969
def read_next_line(self):
        """"""

        next_line = self.file.readline()

        if not next_line or next_line[-1:] != '\n':
            # no newline on last line of file
            self.file = None
        else:
            # trim newline characters
            next_line = next_line[:-1]

        expanded = next_line.expandtabs()

        edit = urwid.Edit("", expanded, allow_tab=True)
        edit.set_edit_pos(0)
        edit.original_text = next_line
        self.lines.append(edit)

        return next_line
93742
private static function _parseData(array $data)
    {
        foreach($data as $key => $value) {
            self::$_data[\mb_strtolower($key)] = $value;
        }
    }
468846
public function parseLines($data) {
        $lines = explode("\n", $data);

        foreach ($lines as $line)
            $this->parseLine($line);

        return $this;
    }
1148135
protected function formatData(array $data) : string {
    $data_string = '';

    foreach ($data as $column => $value) {
      $data_string .= "`{$column}` = :{$column}";

      if (next($data) !== false) {
        $data_string .= ', ';
      }
    }

    return $data_string;
  }
559638
public function parseContentLength($data)
    {
        $this->buffer .= $data;
        if (strlen($this->buffer) >= $this->contentLength) {
            $this->completed();
        }
    }
650801
protected function next()
    {
        while ($token = array_shift($this->tokens)) {
            $this->line += substr_count($this->value($token), "\n");

            if (is_array($token) && in_array($token[0], [T_WHITESPACE, T_COMMENT, T_DOC_COMMENT], true)) {
                continue;
            }

            return $token;
        }
    }
181176
public function read($key, $next)
    {
        $data = $this->directRead($key);
        if (false === $data) {
            $data = $next($key);
            if (false !== $data) {
                $this->directWrite($key, $data);
            }
        }

        return $data;
    }
982576
public function read( $id, $next ) {
		$data = $this->_read( $id );
		if ( false === $data ) {
			$data = $next( $id );
			if ( false !== $data ) {
				$this->_write( $id, $data );
			}
		}

		return $data;
	}
1093941
public void readArray(long[] data) throws IOException {
        int size = data.length;
        for (int i = 0; i < size; ++i)
            data[i] = getLong();
    }
524145
protected function extractNextDataString($data, $lastPosition) {
        $substring = substr($data, $lastPosition);
        $reader = new BinnReader();
        $container = $reader->readNext($substring);
        $substring = $container->getByteString();
        $substringLength = strlen($substring);
        $nextIndex = $lastPosition + $substringLength;
        unset($reader);
        unset($container);
        unset($substringLength);
        return [$substring, $nextIndex];
    }
1312511
protected function updateRowKeyLengths(array $data = [])
    {
        $lengths = array_map('mb_strlen', $data);

        $keys = array_merge(array_keys($lengths), array_keys($this->maxLengths));

        foreach ($keys as $key) {
            if (!isset($this->maxLengths[$key])
                || (isset($lengths[$key]) && $lengths[$key] > $this->maxLengths[$key])
            ) {
                $this->maxLengths[$key] = $lengths[$key];
            }
        }
    }
1337682
public function withFileData($data)
    {
        $stream = new Stream('php://temp', Stream::MODE_READ_WRITE_RESET);

        $stream->write($data);
        $stream->rewind();

        return $this->withFileStream($stream);
    }
242550
protected function parseData(array $data)
	{
		$this->files = array();

		foreach ($data as $key => $value)
		{
			// If this value is an instance of the HttpFoundation File class we will
			// remove it from the data array and add it to the files array, which
			// is used to conveniently separate out the files from other datas.
			if ($value instanceof File)
			{
				$this->files[$key] = $value;

				unset($data[$key]);
			}
		}

		return $data;
	}
945827
protected function cleanup(array &$data)
    {
        foreach ($data as &$value) {
            if (\is_array($value)) {
                $this->cleanup($value);
            }
        }

        $data = array_filter($data, function ($value) {
            return null !== $value;
        });
    }
413414
protected function _fread($length=1)
    {
        if ($length == 0) {
            return '';
        }

        if ($length < 1024) {
            return fread($this->_fileHandle, $length);
        }

        $data = '';
        while ( $length > 0 && ($nextBlock = fread($this->_fileHandle, $length)) != false ) {
            $data .= $nextBlock;
            $length -= strlen($nextBlock);
        }
        return $data;
    }
702220
public function stream_open($data)
    {
        $this->_data = substr($data, strpos($data, ';') + 1);
        $this->_position = 0;

        return true;
    }