File tree 3 files changed +11
-15
lines changed
3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 3
3
namespace Coderflex \LaravelCsv \Concerns ;
4
4
5
5
use League \Csv \Reader ;
6
- use League \Csv \ResultSet ;
7
6
use League \Csv \Statement ;
7
+ use League \Csv \TabularDataReader ;
8
8
9
+ /**
10
+ * Coderflex\LaravelCsv\Concerns\HasCsvProperties
11
+ *
12
+ * @property Reader $readCsv
13
+ * @property array $csvRecords
14
+ */
9
15
trait HasCsvProperties
10
16
{
11
17
use InteractsWithCsvFiles;
12
18
13
19
/**
14
20
* Read CSV Property
15
21
*
16
- * @param void
17
22
* @return Reader
18
23
*/
19
24
public function getReadCsvProperty (): Reader
@@ -24,10 +29,9 @@ public function getReadCsvProperty(): Reader
24
29
/**
25
30
* Get CSV Records Property
26
31
*
27
- * @param void
28
- * @return ResultSet
32
+ * @return TabularDataReader
29
33
*/
30
- public function getCsvRecordsProperty (): ResultSet
34
+ public function getCsvRecordsProperty (): TabularDataReader
31
35
{
32
36
return Statement::create ()->process ($ this ->readCsv );
33
37
}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ trait InteractsWithColumns
7
7
/**
8
8
* Converts the columnsToMap property into an associative array.
9
9
*
10
- * @param array $columnsToMap
11
10
* @return array
12
11
*/
13
12
protected function mapThroughColumns (): array
@@ -24,7 +23,6 @@ protected function mapThroughColumns(): array
24
23
/**
25
24
* Maps requiredColumns property into columnsToMap required state.
26
25
*
27
- * @param array $requiredColumns
28
26
* @return array
29
27
*/
30
28
protected function mapThroughRequiredColumns (): array
@@ -44,7 +42,6 @@ protected function mapThroughRequiredColumns(): array
44
42
/**
45
43
* Maps columnLabels property into columnsToMap label state.
46
44
*
47
- * @param array $columnLabels
48
45
* @return array
49
46
*/
50
47
protected function mapThroughColumnLabels (): array
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class ImportCsv extends Component
15
15
/** @var string */
16
16
public string $ model ;
17
17
18
- /** @var */
18
+ /** @var object */
19
19
public $ file ;
20
20
21
21
/** @var array */
@@ -31,7 +31,7 @@ class ImportCsv extends Component
31
31
public array $ fileHeaders = [];
32
32
33
33
/** @var int */
34
- public int $ fileRowcount = 0 ;
34
+ public int $ fileRowCount = 0 ;
35
35
36
36
public function mount ()
37
37
{
@@ -55,11 +55,6 @@ public function updatedFile()
55
55
$ this ->resetValidation ();
56
56
}
57
57
58
- public function upload ()
59
- {
60
- $ this ->updatedFile ();
61
- }
62
-
63
58
public function render ()
64
59
{
65
60
return view ('laravel-csv::livewire.import-csv ' );
You can’t perform that action at this time.
0 commit comments