Skip to content

Commit dd31625

Browse files
naimsolonggithub-actions[bot]
authored andcommitted
Fix styling
1 parent 772d415 commit dd31625

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/Builder/ExtractBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Exception;
66
use Illuminate\Database\DatabaseManager;
77
use Illuminate\Database\Eloquent\Model;
8-
use Illuminate\Support\Collection;
98
use InvalidArgumentException;
109
use RuntimeException;
1110

src/Builder/SqlBuilder.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace NaimSolong\DataExtractor\Builder;
44

5-
use Carbon\Carbon;
65
use DateTime;
76

87
class SqlBuilder extends BaseBuilder
@@ -20,7 +19,7 @@ public function build(): string
2019
foreach ($this->columns as $column) {
2120
if (! array_key_exists($column, $this->data)) {
2221
$values[] = "'*****'";
23-
22+
2423
continue;
2524
}
2625

@@ -45,11 +44,11 @@ public function build(): string
4544
$values = [];
4645

4746
$arrayValues = [];
48-
foreach($rowValues as $row) {
49-
$arrayValues[] = "(".implode(', ', $row).")";
47+
foreach ($rowValues as $row) {
48+
$arrayValues[] = '('.implode(', ', $row).')';
5049
}
5150

52-
$sql .= "INSERT INTO {$this->schemaName} (".implode(', ', $this->columns)."') VALUES ".implode(', ', $arrayValues).";";
51+
$sql .= "INSERT INTO {$this->schemaName} (".implode(', ', $this->columns)."') VALUES ".implode(', ', $arrayValues).';';
5352

5453
return $sql;
5554
}

src/Extract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function flattenRelation(Collection $models): void
7474
$models->each(function ($model) {
7575
// Get all loaded relations
7676
$relations = $model->getRelations();
77-
77+
7878
foreach ($relations as $relationData) {
7979
if ($relationData instanceof Collection && $relationData->isNotEmpty()) {
8080
// For collections (hasMany, belongsToMany)
@@ -93,7 +93,7 @@ public function flattenRelation(Collection $models): void
9393

9494
public function buildResult(): void
9595
{
96-
collect($this->datas)->unique(function($data) {
96+
collect($this->datas)->unique(function ($data) {
9797
return $data::class.$data['id'];
9898
})->each(function ($data) {
9999
$this->results[] = $this->builder

0 commit comments

Comments
 (0)