Skip to content

Commit

Permalink
Avoiding $this leaking from the constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilverloop committed Mar 5, 2021
1 parent 48ac2af commit 71869ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private function addFromArray(array $columnDatas): void
$orderable = true;
}

$this->add(new Column($columnDatas['data'], $searchable, $orderable));
$this->list[] = new Column($columnDatas['data'], $searchable, $orderable);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private function addFromArray(array $orderDatas): void
throw new \OutOfBoundsException('orders.key.notExist');
}

$this->add(new Order((int)$orderDatas['column'], (string)$orderDatas['dir']));
$this->list[] = new Order((int)$orderDatas['column'], (string)$orderDatas['dir']);
}

/**
Expand Down

0 comments on commit 71869ee

Please sign in to comment.