diff --git a/readme.md b/readme.md index b3c73bc..7d643cb 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ This is a command line tool for easy generation of fake data in a static way. You can find the latest phar on the [releases page](https://github.com/bit3/faker-cli/releases). ```bash -$ wget https://github.com/bit3/faker-cli/releases/download/1.0.4/faker.phar +$ wget https://github.com/bit3/faker-cli/releases/download/1.0.5/faker.phar $ ./faker.phar ``` diff --git a/src/Command/GenerateCommand.php b/src/Command/GenerateCommand.php index 16613d8..44fac4e 100644 --- a/src/Command/GenerateCommand.php +++ b/src/Command/GenerateCommand.php @@ -45,8 +45,7 @@ protected function configure() 'enclosure', 'e', InputOption::VALUE_REQUIRED, - 'The enclosure is used by the csv and printf format.', - '"' + 'The enclosure is used by the csv and printf format.' ) ->addOption( 'escape', @@ -216,7 +215,12 @@ protected function outputCsv(InputInterface $input, OutputInterface $output, $da $stream = fopen('php://temp', 'w+'); foreach ($data as $row) { - fputcsv($stream, $this->flattenArray($row), $delimiter, $enclosure); + if ($enclosure === null) { + fputcsv($stream, $this->flattenArray($row), $delimiter); + } + else { + fputcsv($stream, $this->flattenArray($row), $delimiter, $enclosure); + } } fseek($stream, 0);