Skip to content

Commit f798846

Browse files
committed
Refactor
1 parent 2205bc1 commit f798846

File tree

9 files changed

+0
-99
lines changed

9 files changed

+0
-99
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ return [
6868
'description' => 'Extra all user data',
6969
'format' => 'sql',
7070
'source' => 'default',
71-
'export' => 'default',
7271
],
7372
],
7473

@@ -81,14 +80,6 @@ return [
8180
],
8281
],
8382
],
84-
85-
'export' => [
86-
'default' => [
87-
'file_name' => 'data-extractor',
88-
'file_path' => 'data-extractor',
89-
'disk' => 'local',
90-
],
91-
],
9283
];
9384
```
9485

config/data-extractor.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'description' => 'Extra all user data',
1414
'format' => 'sql',
1515
'source' => 'default',
16-
'export' => 'default',
1716
],
1817
],
1918

@@ -26,12 +25,4 @@
2625
],
2726
],
2827
],
29-
30-
'export' => [
31-
'default' => [
32-
'file_name' => 'data-extractor',
33-
'file_path' => 'data-extractor',
34-
'disk' => 'local',
35-
],
36-
],
3728
];

database/factories/ModelFactory.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

database/migrations/create_data_extractor_table.php.stub

Lines changed: 0 additions & 19 deletions
This file was deleted.

resources/views/.gitkeep

Whitespace-only changes.

src/Commands/DataExtractCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ protected function promptOptions(): array
137137
return [
138138
$option['name'],
139139
$option['description'] ?? 'N/A',
140-
$option['export']['format'],
141140
];
142141
}, $this->options)
143142
);

src/Dto/Export.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/Dto/Option.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public function __construct(
1111
public string $description,
1212
public string $format,
1313
public Source $source,
14-
public Export $export,
1514
) {}
1615

1716
public static function fromArray(array $data): self
@@ -21,7 +20,6 @@ public static function fromArray(array $data): self
2120
description: $data['description'] ?? '',
2221
format: $data['format'] ?? ExtractBuilder::DEFAULT_FORMAT,
2322
source: $data['source'],
24-
export: $data['export'],
2523
);
2624
}
2725

@@ -32,7 +30,6 @@ public function toArray(): array
3230
'description' => $this->description,
3331
'format' => $this->format,
3432
'source' => $this->source->toArray(),
35-
'export' => $this->export->toArray(),
3633
];
3734
}
3835
}

src/OptionsResolver.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace NaimSolong\DataExtractor;
44

55
use InvalidArgumentException;
6-
use NaimSolong\DataExtractor\Dto\Export;
76
use NaimSolong\DataExtractor\Dto\Option;
87
use NaimSolong\DataExtractor\Dto\Source;
98

@@ -22,18 +21,15 @@ protected function resolveInstance(): void
2221
{
2322
$configOptions = config('data-extractor.options', []);
2423
$configSource = config('data-extractor.source', []);
25-
$configExport = config('data-extractor.export', []);
2624

2725
foreach ($configOptions as $option) {
2826
$source = (array_key_exists($option['source'], $configSource)) ? $configSource[$option['source']] : [];
29-
$export = (array_key_exists($option['export'], $configExport)) ? $configExport[$option['export']] : [];
3027

3128
$this->options[] = Option::fromArray([
3229
'name' => $option['name'],
3330
'description' => $option['description'],
3431
'format' => $option['format'],
3532
'source' => Source::fromArray($source),
36-
'export' => Export::fromArray($export),
3733
]);
3834
}
3935
}
@@ -72,9 +68,4 @@ public function source(): Source
7268
{
7369
return $this->option->source;
7470
}
75-
76-
public function export(): Export
77-
{
78-
return $this->option->export;
79-
}
8071
}

0 commit comments

Comments
 (0)