Skip to content

Commit 1b53e00

Browse files
committed
Back to original
- New limit tests passing (?)
1 parent 451b7c2 commit 1b53e00

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Query/Builder.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -2107,16 +2107,12 @@ public function withSuffix(string $suffix): self
21072107

21082108
public function getLimit(): int
21092109
{
2110-
return $this->getSetLimit();
2110+
return $this->getSetLimit() ?? $this->getDefaultLimit() ?? $this->connection->getDefaultLimit();
21112111
}
21122112

2113-
public function getSetLimit(): int
2113+
public function getSetLimit(): ?int
21142114
{
2115-
// If a limit was explicitly set we use that over the defaults.
2116-
return $this->limit
2117-
?? $this->options()->get('limit')
2118-
?? $this->getDefaultLimit()
2119-
?? $this->connection->getDefaultLimit();
2115+
return $this->options()->get('limit', $this->limit) ?? null;
21202116
}
21212117

21222118
public function getDefaultLimit(): ?int

0 commit comments

Comments
 (0)