Passed
Push — master ( e5db94...8fdb0a )
by Nícollas
01:28
created
Source/Model/CRUD.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $sql->bindParam($data[$i], $values[$i]);
58 58
         }
59 59
         return $sql->execute();
60
-        } catch(PDOException $exception) {
60
+        } catch (PDOException $exception) {
61 61
             return $this->writeLog($exception->getMessage(), true);
62 62
         }
63 63
     }
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
     public function insert(String $params, Array $values): ?bool
71 71
     {
72 72
         try {
73
-            $parameters = "(".$params.")";
73
+            $parameters = "(" . $params . ")";
74 74
             $params = explode(',', $params);
75 75
             $data = [];
76 76
             $countParams = count($params);
77
-                for($i = 0; $i < $countParams; $i++) {
78
-                    $data[$i] = ":". $params[$i] . $i;
77
+                for ($i = 0; $i < $countParams; $i++) {
78
+                    $data[$i] = ":" . $params[$i] . $i;
79 79
                 }
80
-            $valueBind = "(".implode(', ', $data).")";
80
+            $valueBind = "(" . implode(', ', $data) . ")";
81 81
             $sql = $this->conn->prepare("INSERT INTO {$this->table} $parameters VALUES $valueBind");
82
-                for($i = 0; $i < $countParams; $i++) {
82
+                for ($i = 0; $i < $countParams; $i++) {
83 83
                     $sql->bindParam($data[$i], $values[$i]);
84 84
                 }
85 85
             return $sql->execute();
86
-        } catch(PDOException $exception) {
86
+        } catch (PDOException $exception) {
87 87
             return $this->writeLog($exception->getMessage(), true);
88 88
         }
89 89
     }
Please login to merge, or discard this patch.