Skip to content

Commit 3e61b0c

Browse files
ousidgithub-actions[bot]
authored andcommitted
Fix styling
1 parent e3d2bdb commit 3e61b0c

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/Concerns/HasCsvProperties.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ trait HasCsvProperties
1717
public function getReadCsvProperty(): Reader
1818
{
1919
dd($this->file);
20+
2021
return $this->readCSV($this->file->getRealPath());
2122
}
2223

@@ -30,7 +31,7 @@ public function getCsvRecordsProperty(): TabularDataReader
3031
{
3132
return Statement::create()->process($this->readCsv);
3233
}
33-
34+
3435
/**
3536
* Update File Headers
3637
*

src/Concerns/InteractsWithFiles.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ protected function readCSV(string $path): Reader
1818
$csv = Reader::createFromStream($stream);
1919

2020
$csv->setHeaderOffset(0);
21-
21+
2222
return $csv;
2323
}
24-
2524
}

src/Http/Livewire/ImportCsv.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ImportCsv extends Component
1616
/** @var string */
1717
public string $model;
1818

19-
/** @var $file */
19+
/** @var */
2020
public $file;
2121

2222
/** @var array */
@@ -28,10 +28,10 @@ class ImportCsv extends Component
2828
/** @var array */
2929
public array $columnLabels = [];
3030

31-
/** @var array $fileHeaders */
31+
/** @var array */
3232
public array $fileHeaders = [];
3333

34-
/** @var int $fileRowcount */
34+
/** @var int */
3535
public int $fileRowcount = 0;
3636

3737
public function mount()

tests/ImportCsvTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use Coderflex\LaravelCsv\Tests\Models\Customer;
55
use Illuminate\Http\UploadedFile;
66
use Illuminate\Support\Facades\Storage;
7-
87
use function Pest\Livewire\livewire;
98

109
it('renders import CSV component', function () {
@@ -129,7 +128,7 @@
129128
->createWithContent(
130129
'customers.csv',
131130
file_get_contents('Data/customers.csv', true)
132-
);
131+
);
133132

134133
$model = Customer::class;
135134

@@ -142,7 +141,7 @@
142141
->assertSet('model', $model)
143142
->assertSet('file', $file)
144143
->assertSet('fileHeaders', [
145-
"id", "first_name", "last_name", "email", "company", "vip", "birthday", "created_at", "updated_at"
144+
'id', 'first_name', 'last_name', 'email', 'company', 'vip', 'birthday', 'created_at', 'updated_at',
146145
])
147146
->assertSet('csvRowCount', 3);
148147
});

0 commit comments

Comments
 (0)