Passed
Branch master (e8ec79)
by Kenneth
03:07
created
Category
src/Statement.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         $name  = $this->getNextName();
65
-        $value = (bool)$value;
66
-        $value = $int ? (int)$value : $value;
65
+        $value = (bool) $value;
66
+        $value = $int ? (int) $value : $value;
67 67
         $type  = $int ? PDO::PARAM_INT : PDO::PARAM_BOOL;
68 68
 
69 69
         $this->bind($name, $value, $type);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $name  = $this->getNextName();
237 237
         $value = sprintf('%u', $value);
238 238
 
239
-        $this->bind($name, (int)$value, PDO::PARAM_INT);
239
+        $this->bind($name, (int) $value, PDO::PARAM_INT);
240 240
         return $this;
241 241
     }
242 242
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $numbers = array();
261 261
 
262 262
         foreach ($data as $value) {
263
-            $numbers[(int)$value] = true;
263
+            $numbers[(int) $value] = true;
264 264
         }
265 265
 
266 266
         $numbers = array_keys($numbers);
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
             throw new DomainException('Can not bind NULL in string spot.');
376 376
         }
377 377
 
378
-        $this->bind($name, (string)$value, $type);
378
+        $this->bind($name, (string) $value, $type);
379 379
         return $this;
380 380
     }
381 381
 
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
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
         $stmt = $PDO->prepare($sql);
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         foreach ($this->named as $name => $sVal) {
465 465
             switch ($sVal['type']) {
466 466
                 case PDO::PARAM_BOOL:
467
-                    $stmt->bindValue($name, (bool)$sVal['value'], $sVal['type']);
467
+                    $stmt->bindValue($name, (bool) $sVal['value'], $sVal['type']);
468 468
                     break;
469 469
 
470 470
                 case PDO::PARAM_NULL:
@@ -472,12 +472,12 @@  discard block
 block discarded – undo
472 472
                     break;
473 473
 
474 474
                 case PDO::PARAM_INT:
475
-                    $stmt->bindValue($name, (int)$sVal['value'], $sVal['type']);
475
+                    $stmt->bindValue($name, (int) $sVal['value'], $sVal['type']);
476 476
                     break;
477 477
 
478 478
                 case PDO::PARAM_STR:
479 479
                 default:
480
-                    $stmt->bindValue($name, (string)$sVal['value'], $sVal['type']);
480
+                    $stmt->bindValue($name, (string) $sVal['value'], $sVal['type']);
481 481
                     break;
482 482
             }
483 483
         }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
                     return 'NULL';
517 517
 
518 518
                 case PDO::PARAM_INT:
519
-                    return (int)$sVal['value'];
519
+                    return (int) $sVal['value'];
520 520
 
521 521
                 case PDO::PARAM_STR:
522 522
                 default:
@@ -559,8 +559,8 @@  discard block
 block discarded – undo
559 559
     {
560 560
         // Replace positioned placeholders with named placeholders (first value).
561 561
         // Force to string, in the case of null.
562
-        $text        = (string)preg_replace_callback('/\?/m', array($this, 'placeholderGetName'), $text);
563
-        $text        = (string)preg_replace_callback('/%%/m', array($this, 'rawPlaceholderGetName'), $text);
562
+        $text        = (string) preg_replace_callback('/\?/m', array($this, 'placeholderGetName'), $text);
563
+        $text        = (string) preg_replace_callback('/%%/m', array($this, 'rawPlaceholderGetName'), $text);
564 564
         $this->SQL[] = $text;
565 565
 
566 566
         return $this;
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 
598 598
         // Replace positioned placeholders with named placeholders (first value).
599 599
         // Force to string, in the case of null.
600
-        $sql = (string)preg_replace_callback('/:[a-z0-9_]+/m', array($this, 'placeholderFill'), $sql);
600
+        $sql = (string) preg_replace_callback('/:[a-z0-9_]+/m', array($this, 'placeholderFill'), $sql);
601 601
 
602 602
         return $sql;
603 603
     }
Please login to merge, or discard this patch.