Skip to content

Commit 6e46a6a

Browse files
committed
fix: allow string user id
1 parent 9e6b30e commit 6e46a6a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Jobs/DataTableExportJob.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,29 @@ class DataTableExportJob implements ShouldBeUnique, ShouldQueue
3939
use Queueable;
4040
use SerializesModels;
4141

42-
public string $dataTable = '';
42+
/**
43+
* @var class-string<DataTable>
44+
*/
45+
public string $dataTable;
4346

4447
public array $attributes = [];
4548

4649
/**
47-
* Create a new job instance.
50+
* @param array{class-string<DataTable>, array} $instance
4851
*/
4952
public function __construct(
50-
array $dataTable,
53+
array $instance,
5154
public array $request,
52-
public ?int $user,
55+
public int|string|null $user,
5356
public string $sheetName = 'Sheet1'
5457
) {
55-
$this->dataTable = $dataTable[0];
56-
$this->attributes = $dataTable[1];
58+
$this->dataTable = $instance[0];
59+
$this->attributes = $instance[1];
5760
}
5861

5962
/**
6063
* Execute the job.
6164
*
62-
*
6365
* @throws \OpenSpout\Common\Exception\IOException
6466
* @throws \OpenSpout\Common\Exception\UnsupportedTypeException
6567
* @throws \OpenSpout\Writer\Exception\WriterNotOpenedException

0 commit comments

Comments
 (0)