phpcs fxes

This commit is contained in:
MarkBaker 2022-06-14 12:19:54 +02:00
parent 7f62fba7ef
commit 4d2b00dafc
2 changed files with 6 additions and 5 deletions

View File

@ -2605,7 +2605,7 @@ class Worksheet implements IComparable
if (isset($this->comments[$cellAddress])) { if (isset($this->comments[$cellAddress])) {
unset($this->comments[$cellAddress]); unset($this->comments[$cellAddress]);
} }
return $this; return $this;
} }

View File

@ -84,13 +84,14 @@ class CommentTest extends TestCase
$comment->setText($test); $comment->setText($test);
self::assertEquals('This is a test comment', (string) $comment); self::assertEquals('This is a test comment', (string) $comment);
} }
public function testRemoveComment(): void { public function testRemoveComment(): void
{
$spreadsheet = new Spreadsheet(); $spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet(); $sheet = $spreadsheet->getActiveSheet();
$sheet->getComment('A2')->getText()->createText('Comment to delete'); $sheet->getComment('A2')->getText()->createText('Comment to delete');
self::assertArrayHasKey('A2',$sheet->getComments()); self::assertArrayHasKey('A2', $sheet->getComments());
$sheet->removeComment('A2'); $sheet->removeComment('A2');
self::assertEmpty($sheet->getComments()); self::assertEmpty($sheet->getComments());
} }
} }