@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | $name = $this->getNextName(); |
66 | - $value = (bool)$value; |
|
67 | - $value = $int ? (int)$value : $value; |
|
66 | + $value = (bool) $value; |
|
67 | + $value = $int ? (int) $value : $value; |
|
68 | 68 | $type = $int ? PDO::PARAM_INT : PDO::PARAM_BOOL; |
69 | 69 | |
70 | 70 | $this->bind($name, $value, $type); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $name = $this->getNextName(); |
242 | 242 | $value = sprintf('%u', $value); |
243 | 243 | |
244 | - $this->bind($name, (int)$value, PDO::PARAM_INT); |
|
244 | + $this->bind($name, (int) $value, PDO::PARAM_INT); |
|
245 | 245 | return $this; |
246 | 246 | } |
247 | 247 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $numbers = array(); |
266 | 266 | |
267 | 267 | foreach ($data as $value) { |
268 | - $numbers[(int)$value] = true; |
|
268 | + $numbers[(int) $value] = true; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | $numbers = array_keys($numbers); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | throw new DomainException('Can not bind NULL in string spot.'); |
379 | 379 | } |
380 | 380 | |
381 | - $this->bind($name, (string)$value, $type); |
|
381 | + $this->bind($name, (string) $value, $type); |
|
382 | 382 | return $this; |
383 | 383 | } |
384 | 384 | |
@@ -451,11 +451,11 @@ discard block |
||
451 | 451 | public function execute(PDO $PDO): PDOStatement |
452 | 452 | { |
453 | 453 | // Prepare the SQL, force to string in case of null. |
454 | - $sql = (string)implode(' ', $this->SQL); |
|
454 | + $sql = (string) implode(' ', $this->SQL); |
|
455 | 455 | |
456 | 456 | // Replace raw placements with raw values. |
457 | 457 | foreach ($this->rawNamed as $name => $rVal) { |
458 | - $sql = (string)preg_replace('/' . $name . '\b/', $rVal, $sql); |
|
458 | + $sql = (string) preg_replace('/' . $name . '\b/', $rVal, $sql); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | /** @var PDOStatement $stmt */ |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | foreach ($this->named as $name => $sVal) { |
466 | 466 | switch ($sVal['type']) { |
467 | 467 | case PDO::PARAM_BOOL: |
468 | - $stmt->bindValue($name, (bool)$sVal['value'], $sVal['type']); |
|
468 | + $stmt->bindValue($name, (bool) $sVal['value'], $sVal['type']); |
|
469 | 469 | break; |
470 | 470 | |
471 | 471 | case PDO::PARAM_NULL: |
@@ -473,12 +473,12 @@ discard block |
||
473 | 473 | break; |
474 | 474 | |
475 | 475 | case PDO::PARAM_INT: |
476 | - $stmt->bindValue($name, (int)$sVal['value'], $sVal['type']); |
|
476 | + $stmt->bindValue($name, (int) $sVal['value'], $sVal['type']); |
|
477 | 477 | break; |
478 | 478 | |
479 | 479 | case PDO::PARAM_STR: |
480 | 480 | default: |
481 | - $stmt->bindValue($name, (string)$sVal['value'], $sVal['type']); |
|
481 | + $stmt->bindValue($name, (string) $sVal['value'], $sVal['type']); |
|
482 | 482 | break; |
483 | 483 | } |
484 | 484 | } |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | return 'NULL'; |
518 | 518 | |
519 | 519 | case PDO::PARAM_INT: |
520 | - return (int)$sVal['value']; |
|
520 | + return (int) $sVal['value']; |
|
521 | 521 | |
522 | 522 | case PDO::PARAM_STR: |
523 | 523 | default: |
@@ -560,11 +560,11 @@ discard block |
||
560 | 560 | { |
561 | 561 | // Replace positioned placeholders with named placeholders (first value). |
562 | 562 | // Force to string, in the case of null. |
563 | - $text = (string)preg_replace_callback('/\?/m', function () { |
|
563 | + $text = (string) preg_replace_callback('/\?/m', function () { |
|
564 | 564 | return $this->placeholderGetName(); |
565 | 565 | }, $text); |
566 | 566 | |
567 | - $text = (string)preg_replace_callback('/%%/m', function () { |
|
567 | + $text = (string) preg_replace_callback('/%%/m', function () { |
|
568 | 568 | return $this->rawPlaceholderGetName(); |
569 | 569 | }, $text); |
570 | 570 | |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | |
605 | 605 | // Replace positioned placeholders with named placeholders (first value). |
606 | 606 | // Force to string, in the case of null. |
607 | - $sql = (string)preg_replace_callback('/:[a-z0-9_]+/m', array($this, 'placeholderFill'), $sql); |
|
607 | + $sql = (string) preg_replace_callback('/:[a-z0-9_]+/m', array($this, 'placeholderFill'), $sql); |
|
608 | 608 | |
609 | 609 | return $sql; |
610 | 610 | } |