Skip to content

Commit f9afb9d

Browse files
authored
Merge pull request #141 from mariomka/patch-1
Allow `shouldAddBom` in `streamDownload`
2 parents 100e963 + 01f812e commit f9afb9d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/SimpleExcelWriter.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,14 @@ public static function createWithoutBom(string $file, string $type = ''): static
5656
);
5757
}
5858

59-
public static function streamDownload(string $downloadName, string $type = '', callable $writerCallback = null, ?string $delimiter = null): static
60-
{
61-
$simpleExcelWriter = new static($downloadName, $type, $delimiter);
59+
public static function streamDownload(
60+
string $downloadName,
61+
string $type = '',
62+
callable $writerCallback = null,
63+
?string $delimiter = null,
64+
?bool $shouldAddBom = null,
65+
): static {
66+
$simpleExcelWriter = new static($downloadName, $type, $delimiter, $shouldAddBom);
6267

6368
$writer = $simpleExcelWriter->getWriter();
6469

0 commit comments

Comments
 (0)