Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.1, 8.2, 8.3 ]
php: [ 8.1, 8.2, 8.3, 8.4 ]
stability: [ lowest, highest ]

steps:
Expand Down
6 changes: 3 additions & 3 deletions src/Exportable.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function setColumnStyles($styles): static
*
* @return string
*/
public function export($path, callable $callback = null)
public function export($path, ?callable $callback = null)
{
self::exportOrDownload($path, 'openToFile', $callback);

Expand All @@ -74,7 +74,7 @@ public function export($path, callable $callback = null)
*
* @return \Symfony\Component\HttpFoundation\StreamedResponse|string
*/
public function download($path, callable $callback = null)
public function download($path, ?callable $callback = null)
{
if (method_exists(response(), 'streamDownload')) {
return response()->streamDownload(function () use ($path, $callback) {
Expand All @@ -97,7 +97,7 @@ public function download($path, callable $callback = null)
* @throws \OpenSpout\Writer\Exception\WriterNotOpenedException
* @throws \OpenSpout\Common\Exception\SpoutException
*/
private function exportOrDownload($path, $function, callable $callback = null)
private function exportOrDownload($path, $function, ?callable $callback = null)
{
if (Str::endsWith($path, 'csv')) {
$options = new \OpenSpout\Writer\CSV\Options();
Expand Down
2 changes: 1 addition & 1 deletion src/FastExcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FastExcel
*
* @param array|Generator|Collection|null $data
*/
public function __construct(array|Generator|Collection $data = null)
public function __construct(array|Generator|Collection|null $data = null)
{
$this->data = $data;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Importable.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract protected function setOptions(&$options);
*
* @return Collection
*/
public function import($path, callable $callback = null)
public function import($path, ?callable $callback = null)
{
$reader = $this->reader($path);

Expand All @@ -64,7 +64,7 @@ public function import($path, callable $callback = null)
*
* @return Collection
*/
public function importSheets($path, callable $callback = null)
public function importSheets($path, ?callable $callback = null)
{
$reader = $this->reader($path);

Expand Down Expand Up @@ -142,7 +142,7 @@ private function transposeCollection(array $array)
*
* @return array
*/
private function importSheet(SheetInterface $sheet, callable $callback = null)
private function importSheet(SheetInterface $sheet, ?callable $callback = null)
{
$headers = [];
$collection = [];
Expand Down
Loading