@@ -79,7 +79,7 @@ public function __construct(
79
79
/**
80
80
* {@inheritdoc}
81
81
*/
82
- public function download ($ export , string $ fileName , string $ writerType = null , array $ headers = [])
82
+ public function download ($ export , string $ fileName , ? string $ writerType = null , array $ headers = [])
83
83
{
84
84
// Clear output buffer to prevent stuff being prepended to the Excel output.
85
85
if (ob_get_length () > 0 ) {
@@ -99,7 +99,7 @@ public function download($export, string $fileName, string $writerType = null, a
99
99
*
100
100
* @param string|null $disk Fallback for usage with named properties
101
101
*/
102
- public function store ($ export , string $ filePath , string $ diskName = null , string $ writerType = null , $ diskOptions = [], string $ disk = null )
102
+ public function store ($ export , string $ filePath , ? string $ diskName = null , ? string $ writerType = null , $ diskOptions = [], ? string $ disk = null )
103
103
{
104
104
if ($ export instanceof ShouldQueue) {
105
105
return $ this ->queue ($ export , $ filePath , $ diskName ?: $ disk , $ writerType , $ diskOptions );
@@ -120,7 +120,7 @@ public function store($export, string $filePath, string $diskName = null, string
120
120
/**
121
121
* {@inheritdoc}
122
122
*/
123
- public function queue ($ export , string $ filePath , string $ disk = null , string $ writerType = null , $ diskOptions = [])
123
+ public function queue ($ export , string $ filePath , ? string $ disk = null , ? string $ writerType = null , $ diskOptions = [])
124
124
{
125
125
$ writerType = FileTypeDetector::detectStrict ($ filePath , $ writerType );
126
126
@@ -149,7 +149,7 @@ public function raw($export, string $writerType)
149
149
/**
150
150
* {@inheritdoc}
151
151
*/
152
- public function import ($ import , $ filePath , string $ disk = null , string $ readerType = null )
152
+ public function import ($ import , $ filePath , ? string $ disk = null , ? string $ readerType = null )
153
153
{
154
154
$ readerType = FileTypeDetector::detect ($ filePath , $ readerType );
155
155
$ response = $ this ->reader ->read ($ import , $ filePath , $ readerType , $ disk );
@@ -164,7 +164,7 @@ public function import($import, $filePath, string $disk = null, string $readerTy
164
164
/**
165
165
* {@inheritdoc}
166
166
*/
167
- public function toArray ($ import , $ filePath , string $ disk = null , string $ readerType = null ): array
167
+ public function toArray ($ import , $ filePath , ? string $ disk = null , ? string $ readerType = null ): array
168
168
{
169
169
$ readerType = FileTypeDetector::detect ($ filePath , $ readerType );
170
170
@@ -174,7 +174,7 @@ public function toArray($import, $filePath, string $disk = null, string $readerT
174
174
/**
175
175
* {@inheritdoc}
176
176
*/
177
- public function toCollection ($ import , $ filePath , string $ disk = null , string $ readerType = null ): Collection
177
+ public function toCollection ($ import , $ filePath , ? string $ disk = null , ? string $ readerType = null ): Collection
178
178
{
179
179
$ readerType = FileTypeDetector::detect ($ filePath , $ readerType );
180
180
@@ -184,7 +184,7 @@ public function toCollection($import, $filePath, string $disk = null, string $re
184
184
/**
185
185
* {@inheritdoc}
186
186
*/
187
- public function queueImport (ShouldQueue $ import , $ filePath , string $ disk = null , string $ readerType = null )
187
+ public function queueImport (ShouldQueue $ import , $ filePath , ? string $ disk = null , ? string $ readerType = null )
188
188
{
189
189
return $ this ->import ($ import , $ filePath , $ disk , $ readerType );
190
190
}
@@ -197,7 +197,7 @@ public function queueImport(ShouldQueue $import, $filePath, string $disk = null,
197
197
*
198
198
* @throws \PhpOffice\PhpSpreadsheet\Exception
199
199
*/
200
- protected function export ($ export , string $ fileName , string $ writerType = null ): TemporaryFile
200
+ protected function export ($ export , string $ fileName , ? string $ writerType = null ): TemporaryFile
201
201
{
202
202
$ writerType = FileTypeDetector::detectStrict ($ fileName , $ writerType );
203
203
0 commit comments