Skip to content

Commit c30e90b

Browse files
ousidgithub-actions[bot]
authored andcommitted
Fix styling
1 parent e4ed583 commit c30e90b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/Concerns/InteractsWithColumns.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
trait InteractsWithColumns
66
{
7-
/**
7+
/**
88
* Converts the columnsToMap property into an associative array.
9-
* @param array $columnsToMap
9+
*
10+
* @param array $columnsToMap
1011
* @return array
1112
*/
1213
protected function mapThroughColumns(): array
1314
{
14-
if (!$this->columnsToMap) {
15+
if (! $this->columnsToMap) {
1516
return [];
1617
}
1718

@@ -22,40 +23,41 @@ protected function mapThroughColumns(): array
2223

2324
/**
2425
* Maps requiredColumns property into columnsToMap required state.
25-
* @param array $requiredColumns
26+
*
27+
* @param array $requiredColumns
2628
* @return array
2729
*/
2830
protected function mapThroughRequiredColumns(): array
2931
{
30-
if (!$this->requiredColumns) {
32+
if (! $this->requiredColumns) {
3133
return [];
3234
}
3335

3436
$this->requiredColumns = collect($this->requiredColumns)
3537
->mapWithKeys(function ($column): array {
36-
return ['columnsToMap.' . $column => 'required'];
38+
return ['columnsToMap.'.$column => 'required'];
3739
})->toArray();
3840

3941
return $this->requiredColumns;
4042
}
4143

4244
/**
4345
* Maps columnLabels property into columnsToMap label state.
44-
* @param array $columnLabels
46+
*
47+
* @param array $columnLabels
4548
* @return array
4649
*/
4750
protected function mapThroughColumnLabels(): array
4851
{
49-
50-
if (!$this->columnLabels) {
52+
if (! $this->columnLabels) {
5153
return [];
5254
}
5355

5456
return collect($this->requiredColumns)
5557
->mapWithKeys(function ($column): array {
5658
return [
57-
'columnsToMap.' . $column => strtolower($this->columnLabels[$column]),
59+
'columnsToMap.'.$column => strtolower($this->columnLabels[$column]),
5860
];
5961
})->toArray();
6062
}
61-
}
63+
}

src/Http/Livewire/ImportCsv.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Coderflex\LaravelCsv\Concerns\InteractsWithColumns;
66
use Livewire\Component;
77
use Livewire\WithFileUploads;
8-
use Termwind\Components\Dd;
98

109
class ImportCsv extends Component
1110
{
@@ -30,7 +29,7 @@ class ImportCsv extends Component
3029
public function mount()
3130
{
3231
$this->columnsToMap = $this->mapThroughColumns();
33-
32+
3433
$this->columnLabels = $this->mapThroughColumnLabels();
3534

3635
$this->requiredColumns = $this->mapThroughRequiredColumns();

tests/ImportCsvTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
});
5959

6060
it('maps requiredColumns property into columnsToMap required state', function () {
61-
6261
$columnsToMap = [
6362
'name',
6463
'email',

0 commit comments

Comments
 (0)