Skip to content

Commit e36e749

Browse files
carlsverregithub-actions[bot]
authored andcommitted
Fix code styling (ci skip)
1 parent 943a303 commit e36e749

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

src/Query/Grammar.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected function wrapUnion($sql): string
137137
/**
138138
* Compile the "union" queries attached to the main query.
139139
*
140-
* @param Builder $query
140+
* @param Builder $query
141141
* @return string
142142
*/
143143
protected function compileUnions(Builder $query): string
@@ -154,15 +154,15 @@ protected function compileUnions(Builder $query): string
154154
/**
155155
* Compile a select query into SQL.
156156
*
157-
* @param Builder $query
157+
* @param Builder $query
158158
* @return string
159159
*/
160160
public function compileSelect(Builder $query): string
161161
{
162162
$sql = parent::compileSelect($query);
163163

164164
if (! empty($query->unionOrders) || isset($query->unionLimit) || isset($query->unionOffset)) {
165-
$sql = "SELECT * FROM (".$sql.") ";
165+
$sql = 'SELECT * FROM ('.$sql.') ';
166166

167167
if (! empty($query->unionOrders)) {
168168
$sql .= ' '.$this->compileOrders($query, $query->unionOrders);
@@ -184,7 +184,7 @@ public function compileSelect(Builder $query): string
184184
* Compile the "offset" portions of the query.
185185
*
186186
* @param Builder $query
187-
* @param $offset
187+
* @param $offset
188188
* @return string
189189
*/
190190
protected function compileOffset(Builder $query, $offset): string

tests/Hybrid/UnionTest.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ protected function setUp(): void
3030
}
3131

3232
/** @test */
33-
function union() {
33+
public function union()
34+
{
3435
if (! $this->runHybridIntegrations()) {
3536
return;
3637
}
@@ -48,7 +49,8 @@ function union() {
4849
}
4950

5051
/** @test */
51-
function unionAll() {
52+
public function unionAll()
53+
{
5254
if (! $this->runHybridIntegrations()) {
5355
return;
5456
}
@@ -66,7 +68,8 @@ function unionAll() {
6668
}
6769

6870
/** @test */
69-
function unionWithOrderByLimitAndOffset() {
71+
public function unionWithOrderByLimitAndOffset()
72+
{
7073
if (! $this->runHybridIntegrations()) {
7174
return;
7275
}
@@ -83,7 +86,8 @@ function unionWithOrderByLimitAndOffset() {
8386
}
8487

8588
/** @test */
86-
function unionWithOrderBy() {
89+
public function unionWithOrderBy()
90+
{
8791
if (! $this->runHybridIntegrations()) {
8892
return;
8993
}
@@ -100,7 +104,8 @@ function unionWithOrderBy() {
100104
}
101105

102106
/** @test */
103-
function unionWithLimit() {
107+
public function unionWithLimit()
108+
{
104109
if (! $this->runHybridIntegrations()) {
105110
return;
106111
}
@@ -113,7 +118,8 @@ function unionWithLimit() {
113118
}
114119

115120
/** @test */
116-
function unionWithOffset() {
121+
public function unionWithOffset()
122+
{
117123
if (! $this->runHybridIntegrations()) {
118124
return;
119125
}
@@ -126,7 +132,8 @@ function unionWithOffset() {
126132
}
127133

128134
/** @test */
129-
function unionWithInnerOffset() {
135+
public function unionWithInnerOffset()
136+
{
130137
if (! $this->runHybridIntegrations()) {
131138
return;
132139
}

0 commit comments

Comments
 (0)