Skip to content

Commit 43de540

Browse files
authored
Cleaned up code.
1 parent 99a05e4 commit 43de540

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Traits/Buildable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ public function paginate(
170170
if (is_array($page)) {
171171
$page = $this->recursiveImplodeWithKey($page);
172172
}
173+
173174
$columns = collect($columns)->toArray();
174-
175175
$keyDifferentiator = "-paginate_by_{$perPage}_{$pageName}_{$page}";
176176

177177
if ($total !== null) {
178178
$total = value($total);
179-
if ($total !== null) {
180-
$keyDifferentiator .= "_{$total}";
181-
}
179+
$keyDifferentiator .= $total !== null
180+
? "_{$total}"
181+
: "";
182182
}
183183

184184
$cacheKey = $this->makeCacheKey($columns, null, $keyDifferentiator);

0 commit comments

Comments
 (0)