From e36e749c0a3e7baa48689862088a52b402c739f0 Mon Sep 17 00:00:00 2001 From: carlsverre Date: Thu, 1 Dec 2022 17:04:42 +0000 Subject: [PATCH] Fix code styling (ci skip) --- src/Query/Grammar.php | 8 ++++---- tests/Hybrid/UnionTest.php | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/Query/Grammar.php b/src/Query/Grammar.php index d8b7e6d..c65a9c2 100644 --- a/src/Query/Grammar.php +++ b/src/Query/Grammar.php @@ -137,7 +137,7 @@ protected function wrapUnion($sql): string /** * Compile the "union" queries attached to the main query. * - * @param Builder $query + * @param Builder $query * @return string */ protected function compileUnions(Builder $query): string @@ -154,7 +154,7 @@ protected function compileUnions(Builder $query): string /** * Compile a select query into SQL. * - * @param Builder $query + * @param Builder $query * @return string */ public function compileSelect(Builder $query): string @@ -162,7 +162,7 @@ public function compileSelect(Builder $query): string $sql = parent::compileSelect($query); if (! empty($query->unionOrders) || isset($query->unionLimit) || isset($query->unionOffset)) { - $sql = "SELECT * FROM (".$sql.") "; + $sql = 'SELECT * FROM ('.$sql.') '; if (! empty($query->unionOrders)) { $sql .= ' '.$this->compileOrders($query, $query->unionOrders); @@ -184,7 +184,7 @@ public function compileSelect(Builder $query): string * Compile the "offset" portions of the query. * * @param Builder $query - * @param $offset + * @param $offset * @return string */ protected function compileOffset(Builder $query, $offset): string diff --git a/tests/Hybrid/UnionTest.php b/tests/Hybrid/UnionTest.php index ee96834..723bc02 100644 --- a/tests/Hybrid/UnionTest.php +++ b/tests/Hybrid/UnionTest.php @@ -30,7 +30,8 @@ protected function setUp(): void } /** @test */ - function union() { + public function union() + { if (! $this->runHybridIntegrations()) { return; } @@ -48,7 +49,8 @@ function union() { } /** @test */ - function unionAll() { + public function unionAll() + { if (! $this->runHybridIntegrations()) { return; } @@ -66,7 +68,8 @@ function unionAll() { } /** @test */ - function unionWithOrderByLimitAndOffset() { + public function unionWithOrderByLimitAndOffset() + { if (! $this->runHybridIntegrations()) { return; } @@ -83,7 +86,8 @@ function unionWithOrderByLimitAndOffset() { } /** @test */ - function unionWithOrderBy() { + public function unionWithOrderBy() + { if (! $this->runHybridIntegrations()) { return; } @@ -100,7 +104,8 @@ function unionWithOrderBy() { } /** @test */ - function unionWithLimit() { + public function unionWithLimit() + { if (! $this->runHybridIntegrations()) { return; } @@ -113,7 +118,8 @@ function unionWithLimit() { } /** @test */ - function unionWithOffset() { + public function unionWithOffset() + { if (! $this->runHybridIntegrations()) { return; } @@ -126,7 +132,8 @@ function unionWithOffset() { } /** @test */ - function unionWithInnerOffset() { + public function unionWithInnerOffset() + { if (! $this->runHybridIntegrations()) { return; }