@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function getLimitClause() : string |
52 | 52 | { |
53 | - if (! $this->query->limit) { |
|
53 | + if (!$this->query->limit) { |
|
54 | 54 | return ""; |
55 | 55 | } |
56 | 56 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | protected function getOffsetClause() : string |
66 | 66 | { |
67 | - if (! $this->query->offset) { |
|
67 | + if (!$this->query->offset) { |
|
68 | 68 | return ""; |
69 | 69 | } |
70 | 70 | |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | $orders = collect($this->query->orders); |
77 | 77 | |
78 | 78 | return $orders |
79 | - ->reduce(function ($carry, $order) { |
|
79 | + ->reduce(function($carry, $order) { |
|
80 | 80 | if (($order["type"] ?? "") === "Raw") { |
81 | - return $carry . "_orderByRaw_" . str_slug($order["sql"]); |
|
81 | + return $carry."_orderByRaw_".str_slug($order["sql"]); |
|
82 | 82 | } |
83 | 83 | |
84 | - return $carry . "_orderBy_" . $order["column"] . "_" . $order["direction"]; |
|
84 | + return $carry."_orderBy_".$order["column"]."_".$order["direction"]; |
|
85 | 85 | }) |
86 | 86 | ?: ""; |
87 | 87 | } |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | return ""; |
93 | 93 | } |
94 | 94 | |
95 | - return "_" . implode("_", $columns); |
|
95 | + return "_".implode("_", $columns); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | protected function getTypeClause($where) : string |
99 | 99 | { |
100 | - $type =in_array($where["type"], ["In", "NotIn", "Null", "NotNull", "between"]) |
|
100 | + $type = in_array($where["type"], ["In", "NotIn", "Null", "NotNull", "between"]) |
|
101 | 101 | ? strtolower($where["type"]) |
102 | 102 | : strtolower($where["operator"]); |
103 | 103 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | |
117 | 117 | |
118 | - return "_" . $values; |
|
118 | + return "_".$values; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | protected function getValuesFromWhere(array $where) : string |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | |
130 | 130 | protected function getValuesFromBindings(array $where, string $values) : string |
131 | 131 | { |
132 | - if (! $values && ($this->query->bindings["where"] ?? false)) { |
|
132 | + if (!$values && ($this->query->bindings["where"] ?? false)) { |
|
133 | 133 | $values = $this->query->bindings["where"][$this->currentBinding]; |
134 | 134 | $this->currentBinding++; |
135 | 135 | |
136 | 136 | if ($where["type"] === "between") { |
137 | - $values .= "_" . $this->query->bindings["where"][$this->currentBinding]; |
|
137 | + $values .= "_".$this->query->bindings["where"][$this->currentBinding]; |
|
138 | 138 | $this->currentBinding++; |
139 | 139 | } |
140 | 140 | } |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | |
145 | 145 | protected function getWhereClauses(array $wheres = []) : string |
146 | 146 | { |
147 | - return "" . $this->getWheres($wheres) |
|
148 | - ->reduce(function ($carry, $where) { |
|
147 | + return "".$this->getWheres($wheres) |
|
148 | + ->reduce(function($carry, $where) { |
|
149 | 149 | $value = $carry; |
150 | 150 | $value .= $this->getNestedClauses($where); |
151 | 151 | $value .= $this->getColumnClauses($where); |
@@ -158,13 +158,13 @@ discard block |
||
158 | 158 | |
159 | 159 | protected function getNestedClauses(array $where) : string |
160 | 160 | { |
161 | - if (! in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
161 | + if (!in_array($where["type"], ["Exists", "Nested", "NotExists"])) { |
|
162 | 162 | return ""; |
163 | 163 | } |
164 | 164 | |
165 | 165 | $this->currentBinding++; |
166 | 166 | |
167 | - return "-" . strtolower($where["type"]) . $this->getWhereClauses($where["query"]->wheres); |
|
167 | + return "-".strtolower($where["type"]).$this->getWhereClauses($where["query"]->wheres); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | protected function getColumnClauses(array $where) : string |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $clause = "_{$where["boolean"]}"; |
189 | 189 | |
190 | 190 | while (count($queryParts) > 1) { |
191 | - $clause .= "_" . array_shift($queryParts); |
|
191 | + $clause .= "_".array_shift($queryParts); |
|
192 | 192 | $clause .= $this->query->bindings["where"][$this->currentBinding]; |
193 | 193 | $this->currentBinding++; |
194 | 194 | } |
@@ -196,10 +196,10 @@ discard block |
||
196 | 196 | $lastPart = array_shift($queryParts); |
197 | 197 | |
198 | 198 | if ($lastPart) { |
199 | - $clause .= "_" . $lastPart; |
|
199 | + $clause .= "_".$lastPart; |
|
200 | 200 | } |
201 | 201 | |
202 | - return "-" . str_replace(" ", "_", $clause); |
|
202 | + return "-".str_replace(" ", "_", $clause); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | protected function getOtherClauses(array $where, string $carry = null) : string |
@@ -233,6 +233,6 @@ discard block |
||
233 | 233 | return ""; |
234 | 234 | } |
235 | 235 | |
236 | - return "-" . implode("-", $eagerLoads->keys()->toArray()); |
|
236 | + return "-".implode("-", $eagerLoads->keys()->toArray()); |
|
237 | 237 | } |
238 | 238 | } |