Passed
Branch master (1156a5)
by guilherme
01:58
created
database/DB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
             self::$connect = new \PDO($dsn, self::$user, self::$pass, $options);
26 26
             self::$connect->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
27 27
 
28
-        } catch (\PDOException $e) {
29
-            echo $e->getMessage() ."in ".$e->getFile();
28
+        }catch (\PDOException $e) {
29
+            echo $e->getMessage()."in ".$e->getFile();
30 30
 
31 31
         }
32 32
         return self::$connect;
Please login to merge, or discard this patch.
database/Delete.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
 
34 34
         $this->delete = "DELETE FROM {$this->table} {$this->terms}";
35 35
 
36
-        try{
36
+        try {
37 37
             $this->result = DB::connect()->prepare($this->delete);
38 38
             $this->result->execute($this->statements);
39 39
             $this->error = true;
40 40
 
41
-        }catch (\PDOException $e){
41
+        }catch (\PDOException $e) {
42 42
             echo $e->getMessage();
43 43
 
44 44
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             $this->result->execute($this->statements);
39 39
             $this->error = true;
40 40
 
41
-        }catch (\PDOException $e){
41
+        } catch (\PDOException $e){
42 42
             echo $e->getMessage();
43 43
 
44 44
         }
Please login to merge, or discard this patch.
database/Read.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@
 block discarded – undo
98 98
             $this->read = DB::connect()->prepare("SELECT * FROM {$this->table} {$this->terms}");
99 99
             $this->read->execute($this->statement);
100 100
             return $this->result = $this->read->fetchAll(\PDO::FETCH_OBJ);
101
-        } catch (\PDOException $e) {
102
-            echo $e->getMessage() . " in " . $e->getFile();
101
+        }catch (\PDOException $e) {
102
+            echo $e->getMessage()." in ".$e->getFile();
103 103
         }
104 104
     }
105 105
 
Please login to merge, or discard this patch.
database/Create.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
         $places = ':'.implode(', :', array_keys($this->data));
40 40
         $this->create = "INSERT INTO {$this->table} ({$fields}) VALUES ({$places})";
41 41
 
42
-        try{
42
+        try {
43 43
 
44 44
             $this->statements = DB::connect()->prepare($this->create);
45 45
             $this->statements->execute($this->data);
46 46
             $this->result = DB::connect()->lastInsertId();
47 47
 
48
-        }catch (\PDOException $e){
48
+        }catch (\PDOException $e) {
49 49
             echo $e->getMessage();
50 50
 
51 51
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $this->statements->execute($this->data);
46 46
             $this->result = DB::connect()->lastInsertId();
47 47
 
48
-        }catch (\PDOException $e){
48
+        } catch (\PDOException $e){
49 49
             echo $e->getMessage();
50 50
 
51 51
         }
Please login to merge, or discard this patch.
database/Update.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->data = $data;
66 66
         parse_str($parse, $this->statements);
67 67
 
68
-        foreach ($data as $key => $value){
68
+        foreach ($data as $key => $value) {
69 69
             $this->places[] = $key.' = :'.$key;
70 70
 
71 71
         }
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 
75 75
         $this->update = "UPDATE {$this->table} SET {$this->places} {$this->terms}";
76 76
 
77
-        try{
77
+        try {
78 78
             $this->result = DB::connect()->prepare($this->update);
79 79
             $this->result->execute(array_merge($this->data, $this->statements));
80 80
             $this->error = ['dado atualizado'];
81 81
 
82 82
 
83
-        }catch (\PDOException $e){
83
+        }catch (\PDOException $e) {
84 84
             echo $e->getMessage();
85 85
 
86 86
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             $this->error = ['dado atualizado'];
81 81
 
82 82
 
83
-        }catch (\PDOException $e){
83
+        } catch (\PDOException $e){
84 84
             echo $e->getMessage();
85 85
 
86 86
         }
Please login to merge, or discard this patch.