Skip to content

Commit

Permalink
Merge pull request #158 from Vahram1995/master
Browse files Browse the repository at this point in the history
Correcting pagination data return type
  • Loading branch information
armanist authored Sep 12, 2024
2 parents bffd68d + 8c66604 commit 391477e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Libraries/Database/Idiorm/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ public function lastItem()
}

/**
* @return array|IdiormResultSet
* @return array
*/
public function data()
{
if (!empty($this->data) && !is_array($this->data)){
$this->data = $this->data->as_array();
}
return $this->data ?? [];
}
}

0 comments on commit 391477e

Please sign in to comment.