From ae076c7e4af0032a00943f51bf7d8a06e98ce95b Mon Sep 17 00:00:00 2001 From: Tristan Lins Date: Mon, 25 Aug 2014 09:35:40 +0200 Subject: [PATCH 1/2] Fix #4, remove enclosure default value. --- src/Command/GenerateCommand.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); From 277526bbaf6c2f6e8c9450f15946031768503231 Mon Sep 17 00:00:00 2001 From: Tristan Lins Date: Mon, 25 Aug 2014 09:38:52 +0200 Subject: [PATCH 2/2] Update the phar download link. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ```