@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public function orderBy(string $parameter, $order = null): self |
188 | 188 | { |
189 | 189 | try { |
190 | - $query = "ORDER BY {$parameter} ".($order ?? 'ASC'); |
|
190 | + $query = "ORDER BY {$parameter} " . ($order ?? 'ASC'); |
|
191 | 191 | $this->add($query, "orderBy"); |
192 | 192 | return $this; |
193 | 193 | } catch (\PDOException $e) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | public function addOrderBy(string $parameter, $order = null): self |
199 | 199 | { |
200 | 200 | try { |
201 | - $query = ", {$parameter} ".($order ?? 'ASC')." "; |
|
201 | + $query = ", {$parameter} " . ($order ?? 'ASC') . " "; |
|
202 | 202 | $this->add($query, "addOrderBy"); |
203 | 203 | return $this; |
204 | 204 | } catch (\PDOException $e) { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | public function limit(string $texto): self |
214 | 214 | { |
215 | 215 | $query = "LIMIT {$texto}"; |
216 | - $this->add($query,"limit"); |
|
216 | + $this->add($query, "limit"); |
|
217 | 217 | return $this; |
218 | 218 | } |
219 | 219 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | { |
226 | 226 | try { |
227 | 227 | $query = "OFFSET {$texto}"; |
228 | - $this->add($query,"offset"); |
|
228 | + $this->add($query, "offset"); |
|
229 | 229 | return $this; |
230 | 230 | } catch (\PDOException $e) { |
231 | 231 | $this->setError($e); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | { |
241 | 241 | try { |
242 | 242 | $query = "GROUP BY {$texto}"; |
243 | - $this->add($query,"groupBy"); |
|
243 | + $this->add($query, "groupBy"); |
|
244 | 244 | return $this; |
245 | 245 | } catch (\PDOException $e) { |
246 | 246 | $this->setError($e); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | { |
256 | 256 | try { |
257 | 257 | $query = "HAVING {$texto}"; |
258 | - $this->add($query,"having"); |
|
258 | + $this->add($query, "having"); |
|
259 | 259 | return $this; |
260 | 260 | } catch (\PDOException $e) { |
261 | 261 | $this->setError($e); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | { |
271 | 271 | try { |
272 | 272 | $query = "AND {$texto}"; |
273 | - $this->add($query,"andHaving"); |
|
273 | + $this->add($query, "andHaving"); |
|
274 | 274 | return $this; |
275 | 275 | } catch (\PDOException $e) { |
276 | 276 | $this->setError($e); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | { |
286 | 286 | try { |
287 | 287 | $query = "OR {$codition}"; |
288 | - $this->add($query,"orHaving"); |
|
288 | + $this->add($query, "orHaving"); |
|
289 | 289 | return $this; |
290 | 290 | } catch (\PDOException $e) { |
291 | 291 | $this->setError($e); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | { |
303 | 303 | try { |
304 | 304 | $query = "INNER JOIN {$table} AS {$alias} ON $codition"; |
305 | - $this->add($query,"join"); |
|
305 | + $this->add($query, "join"); |
|
306 | 306 | return $this; |
307 | 307 | } catch (\PDOException $e) { |
308 | 308 | $this->setError($e); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | { |
320 | 320 | try { |
321 | 321 | $query = "LEFT JOIN {$table} AS {$alias} ON {$codition}"; |
322 | - $this->add($query,"join"); |
|
322 | + $this->add($query, "join"); |
|
323 | 323 | return $this; |
324 | 324 | } catch (\PDOException $e) { |
325 | 325 | $this->setError($e); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | { |
337 | 337 | try { |
338 | 338 | $query = "RIGHT JOIN {$table} AS {$alias} ON $codition"; |
339 | - $this->add($query,"join"); |
|
339 | + $this->add($query, "join"); |
|
340 | 340 | return $this; |
341 | 341 | } catch (\PDOException $e) { |
342 | 342 | $this->setError($e); |
@@ -349,9 +349,9 @@ discard block |
||
349 | 349 | public function executeQuery(): self |
350 | 350 | { |
351 | 351 | try { |
352 | - foreach ($this->sqlPartsSelect as $key => $part){ |
|
352 | + foreach ($this->sqlPartsSelect as $key => $part) { |
|
353 | 353 | if (is_array($part)) { |
354 | - foreach ($part as $item){ |
|
354 | + foreach ($part as $item) { |
|
355 | 355 | $this->query .= $item; |
356 | 356 | } |
357 | 357 | } else { |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | |
413 | 413 | private function add(string $text, string $type, array $params = []) |
414 | 414 | { |
415 | - $text = $text." "; |
|
415 | + $text = $text . " "; |
|
416 | 416 | try { |
417 | 417 | if (is_array($this->sqlPartsSelect[$type])) { |
418 | 418 | $this->sqlPartsSelect[$type][] = $text; |