Skip to content

Commit 1dfc9c0

Browse files
authored
Merge pull request #180 from hmazter/php-84-implicit-nullable
Fix deprecation warning for PHP 8.4 implicit nullable parameter
2 parents ff93066 + c853f16 commit 1dfc9c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/SimpleExcelReader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function preserveEmptyRows(): self
138138
return $this;
139139
}
140140

141-
public function trimHeaderRow(string $characters = null): self
141+
public function trimHeaderRow(?string $characters = null): self
142142
{
143143
$this->trimHeader = true;
144144
$this->trimHeaderCharacters = $characters;

src/SimpleExcelWriter.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SimpleExcelWriter
2525
public static function create(
2626
string $file,
2727
string $type = '',
28-
callable $configureWriter = null,
28+
?callable $configureWriter = null,
2929
?string $delimiter = null,
3030
?bool $shouldAddBom = null,
3131
): static {
@@ -59,7 +59,7 @@ public static function createWithoutBom(string $file, string $type = ''): static
5959
public static function streamDownload(
6060
string $downloadName,
6161
string $type = '',
62-
callable $writerCallback = null,
62+
?callable $writerCallback = null,
6363
?string $delimiter = null,
6464
?bool $shouldAddBom = null,
6565
): static {
@@ -148,7 +148,7 @@ public function setHeaderStyle(Style $style): static
148148
return $this;
149149
}
150150

151-
public function addRow(Row|array $row, Style $style = null): static
151+
public function addRow(Row|array $row, ?Style $style = null): static
152152
{
153153
if (is_array($row)) {
154154
if ($this->processHeader && $this->processingFirstRow) {
@@ -166,7 +166,7 @@ public function addRow(Row|array $row, Style $style = null): static
166166
return $this;
167167
}
168168

169-
public function addRows(iterable $rows, Style $style = null): static
169+
public function addRows(iterable $rows, ?Style $style = null): static
170170
{
171171
foreach ($rows as $row) {
172172
$this->addRow($row, $style);

0 commit comments

Comments
 (0)