Skip to content

Commit 9b05700

Browse files
committed
fix
1 parent 9b42523 commit 9b05700

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
.idea/

src/Exporters/Sheet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function getHeadingStyle()
120120
* @param string $name
121121
* @return $this
122122
*/
123-
public function name($name)
123+
public function name(?string $name)
124124
{
125125
if (is_string($name)) {
126126
$this->name = $name;

tests/Exporters/XLSX/WithChunkQueryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testStore()
3232
->store($storePath);
3333

3434
// 读取
35-
$this->assertSingleSheet($storePath, 'Sheet1', $users);
35+
$this->assertSingleSheet($storePath, '0', $users);
3636

3737
/*
3838
|---------------------------------------------------------------
@@ -81,7 +81,7 @@ public function testRaw()
8181
file_put_contents($storePath, $contents);
8282

8383
// 读取
84-
$this->assertSingleSheet($storePath, 'Sheet1', $users);
84+
$this->assertSingleSheet($storePath, '0', $users);
8585

8686
/*
8787
|---------------------------------------------------------------

tests/Exporters/XLSX/WithSheetTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function test()
2424
$storePath = $this->generateTempFilePath('xlsx');
2525

2626
$sheet = Excel::createSheet($users)
27+
->name('test')
2728
->headingStyle(
2829
(new StyleBuilder)
2930
->setFontColor(Color::BLUE)
@@ -43,7 +44,7 @@ public function test()
4344
Excel::export($sheet)->store($storePath);
4445

4546
// 读取
46-
$this->assertSingleSheet($storePath, 'Sheet1', $users);
47+
$this->assertSingleSheet($storePath, 'test', $users);
4748

4849
/*
4950
|---------------------------------------------------------------

0 commit comments

Comments
 (0)