Skip to content

Commit

Permalink
Fix test psalm.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed May 22, 2023
1 parent 034d87d commit 89c41fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function getColumnOrder(string $value): int|null
{
$orders = $this->getColumnOrders();

return $orders[$value] ?? null;
return isset($orders[$value]) && is_int($orders[$value]) ? $orders[$value] : null;
}

/**
Expand All @@ -123,7 +123,7 @@ public function getColumnOrder(string $value): int|null
*/
public function getColumnOrders(): array
{
$columns = $this->columns ?? [];
$columns = $this->columns;

if ($this->params === [] && $this->multiSort === false) {
return array_slice($columns, 0, 1, true);
Expand Down

0 comments on commit 89c41fa

Please sign in to comment.