Skip to content

Commit 996f4b3

Browse files
committed
StyleCI
1 parent 76e8ddc commit 996f4b3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/QueryDataTable.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,16 @@ public function prepareCountQuery(): QueryBuilder
164164
$builder = clone $this->query;
165165

166166
if ($this->isComplexQuery($builder)) {
167-
$query_without_selects = clone $this->query;
168-
$query_without_selects->select(DB::raw('1'));
169-
170-
if ($this->ignoreSelectInCountQuery || ! $this->isComplexQuery($query_without_selects)) {
167+
$builder->select(DB::raw('1'));
168+
if ($this->ignoreSelectInCountQuery || ! $this->isComplexQuery($builder)) {
171169
return $this->getConnection()
172170
->query()
173-
->fromRaw('('.$query_without_selects->toSql().') count_row_table')
174-
->setBindings($query_without_selects->getBindings());
171+
->fromRaw('('.$builder->toSql().') count_row_table')
172+
->setBindings($builder->getBindings());
175173
}
176174

175+
$builder = clone $this->query;
176+
177177
return $this->getConnection()
178178
->query()
179179
->fromRaw('('.$builder->toSql().') count_row_table')
@@ -813,7 +813,7 @@ public function getFilteredQuery(): QueryBuilder
813813
*
814814
* @return $this
815815
*/
816-
public function ignoreSelectsInCountQuery()
816+
public function ignoreSelectsInCountQuery(): static
817817
{
818818
$this->ignoreSelectInCountQuery = true;
819819

0 commit comments

Comments
 (0)