File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed
Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ parameters:
55 level: 5
66 paths:
77 - src
8- - config
98 - database
109 tmpDir: build/phpstan
1110 checkOctaneCompatibility: true
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ public function build(): string
1414 // Add header row
1515 $ csv .= implode (', ' , $ this ->columns )."\n" ;
1616
17+ $ csvRow = [];
18+
1719 // Add data rows
1820 foreach ($ this ->columns as $ column ) {
1921 if (! array_key_exists ($ column , $ this ->data )) {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ExtractBuilder
1717 public const DEFAULT_FORMAT = self ::FORMAT_SQL ;
1818
1919 public const FORMATS = [
20- // self::FORMAT_CSV, // TODO: Enable this when ready
20+ self ::FORMAT_CSV ,
2121 self ::FORMAT_SQL ,
2222 ];
2323
Original file line number Diff line number Diff line change 33namespace NaimSolong \DataExtractor \Commands ;
44
55use Illuminate \Console \Command ;
6+ use NaimSolong \DataExtractor \Builder \ExtractBuilder ;
67use NaimSolong \DataExtractor \Dto \Export ;
78
89class DataExtractCommand extends Command
@@ -105,7 +106,7 @@ protected function validateOptions(): bool
105106 return false ;
106107 }
107108
108- if (! in_array ($ option ['export ' ]['format ' ], Export ::FORMATS )) {
109+ if (! in_array ($ option ['export ' ]['format ' ], ExtractBuilder ::FORMATS )) {
109110 $ this ->error ('Invalid export format in option: ' .$ option ['name ' ]);
110111
111112 return false ;
You can’t perform that action at this time.
0 commit comments