src/Http/Middleware/Payload.php
protected static function csvParser(StreamInterface $stream): array
	{
		if ($stream->isSeekable()) {
			$stream->rewind();
		}

		$handle = $stream->detach();
		$data = [];
		while (($row = \fgetcsv($handle)) !== false) {
			$data[] = $row;
		}
		\fclose($handle);

		return ['body' => $data];
	}
protected static function csvParser(StreamInterface $stream): array
	{
		if ($stream->isSeekable()) {
			$stream->rewind();
		}

		$handle = $stream->detach();
		$data = [];
		while (($row = \fgetcsv($handle)) !== false) {
			$data[] = $row;
		}
		\fclose($handle);

		return ['body' => $data];
	}
protected static function csvParser ( StreamInterface $ stream ) : array { if ( $ stream -> isSeekable ( ) ) { $ stream -> rewind ( ) ; } $ handle = $ stream -> detach ( ) ; $ data = [ ] ; while ( ( $ row = \ fgetcsv ( $ handle ) ) !== false ) { $ data [ ] = $ row ; } \ fclose ( $ handle ) ; return [ 'body' => $ data ] ; }
Parses csv strings.

@param StreamInterface $stream

@return array
@throws \RuntimeException
Parses csv strings .