Skip to content

Commit

Permalink
Improved removeHeaderlessColumns return value for chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
JPustkuchen committed Jun 11, 2021
1 parent 80cd35d commit 1828294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Elements/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public function render() {
*
* Only useful if header was set before.
*
* @return array List of all removed headerless column keys.
* @return Table
*/
public function removeHeaderlessColumns() {
public function removeHeaderlessColumns(): Table {
$cellKeys = $this->header->getCellKeys();
$removedColumns = [];
if (!empty($this->rows) && !empty($cellKeys)) {
Expand All @@ -170,6 +170,6 @@ public function removeHeaderlessColumns() {
}
}
}
return $removedColumns;
return $this;
}
}

0 comments on commit 1828294

Please sign in to comment.