mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Merge pull request #81 from beyondcode/analysis-GDEdVA
Apply fixes from StyleCI
This commit is contained in:
@@ -38,10 +38,10 @@ class DatabaseUserRepository implements UserRepository
|
|||||||
$this->database
|
$this->database
|
||||||
->query('SELECT * FROM users ORDER by created_at DESC LIMIT :limit OFFSET :offset', [
|
->query('SELECT * FROM users ORDER by created_at DESC LIMIT :limit OFFSET :offset', [
|
||||||
'limit' => $perPage + 1,
|
'limit' => $perPage + 1,
|
||||||
'offset' => $currentPage < 2 ? 0 : ($currentPage - 1) * $perPage,
|
'offset' => $currentPage < 2 ? 0 : ($currentPage - 1) * $perPage,
|
||||||
])
|
])
|
||||||
->then(function (Result $result) use ($deferred, $perPage, $currentPage) {
|
->then(function (Result $result) use ($deferred, $perPage, $currentPage) {
|
||||||
if(count($result->rows) == $perPage + 1) {
|
if (count($result->rows) == $perPage + 1) {
|
||||||
array_pop($result->rows);
|
array_pop($result->rows);
|
||||||
$nextPage = $currentPage + 1;
|
$nextPage = $currentPage + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user