Skip to content

Commit e74a3bf

Browse files
committed
chore: fix cs
1 parent 92eee08 commit e74a3bf

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/SQLLoader.php

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -406,21 +406,17 @@ protected function buildDefaultColumns(string $table, array $columns): array
406406
$columns = $this->defaultColumns;
407407
$schemaColumns = collect(Schema::connection(config('sql-loader.connection'))->getColumns($table));
408408

409-
$dates = $schemaColumns->filter(function ($column) {
410-
return in_array($column['type'], [
411-
'DATE',
412-
'DATETIME',
413-
'TIMESTAMP',
414-
'TIMESTAMP(6)',
415-
]);
416-
})->pluck('name')->toArray();
417-
418-
$booleans = $schemaColumns->filter(function ($column) {
419-
return $column['nullable'] === 'N' && $column['type'] === 'CHAR';
420-
})->pluck('name')->toArray();
409+
$dates = $schemaColumns->filter(fn ($column) => in_array($column['type'], [
410+
'DATE',
411+
'DATETIME',
412+
'TIMESTAMP',
413+
'TIMESTAMP(6)',
414+
]))->pluck('name')->toArray();
415+
416+
$booleans = $schemaColumns->filter(fn ($column) => $column['nullable'] === 'N' && $column['type'] === 'CHAR')->pluck('name')->toArray();
421417

422418
foreach ($columns as $key => $column) {
423-
$column = strtoupper($column);
419+
$column = strtoupper((string) $column);
424420

425421
if (in_array($column, $dates)) {
426422
$columns[$key] = "\"$column\" DATE";

0 commit comments

Comments
 (0)