Skip to content

Commit 64eb58e

Browse files
committed
fix static analysis
1 parent 7484189 commit 64eb58e

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

src/Concerns/HasCsvProperties.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@
33
namespace Coderflex\LaravelCsv\Concerns;
44

55
use League\Csv\Reader;
6-
use League\Csv\ResultSet;
76
use League\Csv\Statement;
7+
use League\Csv\TabularDataReader;
88

9+
/**
10+
* Coderflex\LaravelCsv\Concerns\HasCsvProperties
11+
*
12+
* @property Reader $readCsv
13+
* @property array $csvRecords
14+
*/
915
trait HasCsvProperties
1016
{
1117
use InteractsWithCsvFiles;
1218

1319
/**
1420
* Read CSV Property
1521
*
16-
* @param void
1722
* @return Reader
1823
*/
1924
public function getReadCsvProperty(): Reader
@@ -24,10 +29,9 @@ public function getReadCsvProperty(): Reader
2429
/**
2530
* Get CSV Records Property
2631
*
27-
* @param void
28-
* @return ResultSet
32+
* @return TabularDataReader
2933
*/
30-
public function getCsvRecordsProperty(): ResultSet
34+
public function getCsvRecordsProperty(): TabularDataReader
3135
{
3236
return Statement::create()->process($this->readCsv);
3337
}

src/Concerns/InteractsWithColumns.php

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ trait InteractsWithColumns
77
/**
88
* Converts the columnsToMap property into an associative array.
99
*
10-
* @param array $columnsToMap
1110
* @return array
1211
*/
1312
protected function mapThroughColumns(): array
@@ -24,7 +23,6 @@ protected function mapThroughColumns(): array
2423
/**
2524
* Maps requiredColumns property into columnsToMap required state.
2625
*
27-
* @param array $requiredColumns
2826
* @return array
2927
*/
3028
protected function mapThroughRequiredColumns(): array
@@ -44,7 +42,6 @@ protected function mapThroughRequiredColumns(): array
4442
/**
4543
* Maps columnLabels property into columnsToMap label state.
4644
*
47-
* @param array $columnLabels
4845
* @return array
4946
*/
5047
protected function mapThroughColumnLabels(): array

src/Http/Livewire/ImportCsv.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ImportCsv extends Component
1515
/** @var string */
1616
public string $model;
1717

18-
/** @var */
18+
/** @var object */
1919
public $file;
2020

2121
/** @var array */
@@ -31,7 +31,7 @@ class ImportCsv extends Component
3131
public array $fileHeaders = [];
3232

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

3636
public function mount()
3737
{
@@ -55,11 +55,6 @@ public function updatedFile()
5555
$this->resetValidation();
5656
}
5757

58-
public function upload()
59-
{
60-
$this->updatedFile();
61-
}
62-
6358
public function render()
6459
{
6560
return view('laravel-csv::livewire.import-csv');

0 commit comments

Comments
 (0)