Skip to content

Commit

Permalink
Add guard for type
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k3lm committed Oct 8, 2024
1 parent b981833 commit b419ee2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ public function find(int $limit, int $offset, ?DateTime $disconnectTime = null):
$queryFilter->where('timestamp', Operators::GREATER_THAN, $disconnectTime);
}

return $this->repository->select($queryFilter);
return array_filter(
$this->repository->select($queryFilter),
function ($transactionLog) {
return $transactionLog instanceof TransactionLog;
}
);
}

/**
Expand Down

0 comments on commit b419ee2

Please sign in to comment.