Skip to content

Commit 861b955

Browse files
authored
Add feature removeComment
Use $cellCoordinate as argument Return $this to support the fluent interface
1 parent 801f529 commit 861b955

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2588,9 +2588,9 @@ public function setComments(array $comments)
25882588
* @param array<int>|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5';
25892589
* or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.
25902590
*
2591-
* @return Comment
2591+
* @return $this
25922592
*/
2593-
public function removeComment($cellCoordinate):void
2593+
public function removeComment($cellCoordinate)
25942594
{
25952595
$cellAddress = Functions::trimSheetFromCellReference(Validations::validateCellAddress($cellCoordinate));
25962596

@@ -2605,6 +2605,8 @@ public function removeComment($cellCoordinate):void
26052605
if (isset($this->comments[$cellAddress])) {
26062606
unset($this->comments[$cellAddress]);
26072607
}
2608+
2609+
return $this;
26082610
}
26092611

26102612
/**

0 commit comments

Comments
 (0)