Passed
Push — master ( acb42d...3c39f1 )
by Anthony
03:03
created
core/database/Database.php 1 patch
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
 			if ($query) {
56 56
 				$obj = $query->fetchAll(PDO::FETCH_OBJ);
57 57
 				return $obj;
58
-			}
59
-			else {
58
+			} else {
60 59
 				FlashMessage::setFlash("Une erreur est survenue en executant cette requette : ".$req);
61 60
 			}
62 61
 		}
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
 		public function rechercherEgalite($table, $champ, $value, $id_table = null, $id = null) {
85 84
 			if ($id == null) {
86 85
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value'");
87
-			}
88
-			else {
86
+			} else {
89 87
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value' AND $id_table != $id");
90 88
 			}
91 89
 
@@ -94,9 +92,10 @@  discard block
 block discarded – undo
94 92
 					$nb = $obj["nb"];
95 93
 				}
96 94
 
97
-				if ((isset($nb)) && ($nb != 0)) return true;
98
-			}
99
-			else {
95
+				if ((isset($nb)) && ($nb != 0)) {
96
+					return true;
97
+				}
98
+			} else {
100 99
 				return false;
101 100
 			}
102 101
 		}
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 
114 113
 			if ($query->rowCount() > 0) {
115 114
 				return true;
116
-			}
117
-			else {
115
+			} else {
118 116
 				return false;
119 117
 			}
120 118
 		}
Please login to merge, or discard this patch.