Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rafageist committed Jan 23, 2024
1 parent f2ff1cc commit d2358ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public function eval(int $row, int $column): void
{
$this->validateCoordinates($row, $column);

if ($this->matrix_original[$row][$column] instanceof \Closure) {
if ($this->matrix_original[$row][$column] instanceof Closure) {
if (!isset($this->evaluatedCells[$row][$column])) {
$this->matrix[$row][$column] = $this->matrix_original[$row][$column]($row, $column, $this);
$this->evaluatedCells[$row][$column] = true;
Expand Down Expand Up @@ -873,7 +873,7 @@ public function evaluate(): void

foreach ($this->matrix_original as $rowIndex => $row) {
foreach ($row as $colIndex => $col) {
if ($col instanceof \Closure) {
if ($col instanceof Closure) {
try {
$this->eval($rowIndex, $colIndex);
} catch (\Exception $e) {
Expand Down Expand Up @@ -979,12 +979,12 @@ public function range(int $rowFrom, int $columnFrom, int $rowTo, int $columnTo):
* Group by a column
*
* @param array<string> $columns
* @param \Closure $aggregate
* @param Closure $aggregate
* @param bool $firstRowAsHeaders
*
* @return array<array<array<mixed>>>
*/
public function groupBy(array $columns, \Closure $aggregate = null, bool $firstRowAsHeaders = false): array
public function groupBy(array $columns, Closure $aggregate = null, bool $firstRowAsHeaders = false): array
{
$data = $this->matrix;

Expand Down

0 comments on commit d2358ba

Please sign in to comment.