File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ $lazyCsvCollection = SimpleCsv::import(storage_path('collection.csv'));
3131
3232### Empty Keys to Null
3333
34- PHP's 'putcsv' doesn't support writing ` null ` to csv files. The LazyCsvCollection returned by the import method
35- exposes a lazy ' emptyToNull' method that will convert empty array keys to null values for convenience.
34+ PHP's ` fputcsv() ` doesn't support writing ` null ` to csv files as it's not a string . The LazyCsvCollection returned by the import method
35+ exposes a lazy ` emptyToNull() ` method that will convert empty values to null for convenience.
3636
3737``` php
3838use BayAreaWebPro\SimpleCsv\SimpleCsv;
@@ -81,11 +81,9 @@ return SimpleCsv::download([...], 'download.csv');
8181``` php
8282use Illuminate\Support\Facades\Config;
8383
84- Config::set('simple-csv', [
85- 'delimiter' => '?',
86- 'enclosure' => '?',
87- 'escape' => '?',
88- ]);
84+ Config::set('simple-csv.delimiter', ...);
85+ Config::set('simple-csv.enclosure', ...);
86+ Config::set('simple-csv.escape', ...);
8987```
9088
9189## Or, Create a Config File
Original file line number Diff line number Diff line change 22
33namespace BayAreaWebPro \SimpleCsv \Tests \Unit ;
44
5- use BayAreaWebPro \SimpleCsv \SimpleCsv ;
65use BayAreaWebPro \SimpleCsv \SimpleCsvService ;
76use BayAreaWebPro \SimpleCsv \SimpleCsvServiceProvider ;
87use BayAreaWebPro \SimpleCsv \Tests \TestCase ;
@@ -27,7 +26,7 @@ public function test_facade_can_resolve_instance()
2726 public function test_service_can_be_resolved ()
2827 {
2928 $ csv = app ('simple-csv ' );
30- $ this ->assertTrue (( $ csv instanceof SimpleCsvService) );
29+ $ this ->assertInstanceOf (SimpleCsvService::class, $ csv );
3130 }
3231
3332 public function test_declares_provided ()
You can’t perform that action at this time.
0 commit comments