Passed
Push — master ( 60b502...80cc4f )
by Anthony
02:55
created
core/Database.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		 * pour intialiser la ou les clauses where d'une requete
249 249
 		 */
250 250
 		public function where($champ, $cond, $champ_test, $closure = null) {
251
-			if ( $closure === null) {
251
+			if ($closure === null) {
252 252
 				$this->conditions[] = $champ.$cond.$champ_test;
253 253
 			}
254 254
 			else {
@@ -264,10 +264,10 @@  discard block
 block discarded – undo
264 264
 		 * fonction qui permet de récupérer un select fait sur une table
265 265
 		 */
266 266
 		public function get() {
267
-			$requete = $this->req_beginning . implode(",", $this->champs) . " FROM " . implode(",", $this->table);
267
+			$requete = $this->req_beginning.implode(",", $this->champs)." FROM ".implode(",", $this->table);
268 268
 
269 269
 			if (!empty($this->conditions)) {
270
-				$requete .= " WHERE ". implode(" ", $this->conditions);
270
+				$requete .= " WHERE ".implode(" ", $this->conditions);
271 271
 			}
272 272
 
273 273
 			$this->unsetQueryBuilder();
@@ -282,15 +282,15 @@  discard block
 block discarded – undo
282 282
 
283 283
 			$datas = [];
284 284
 			$count = count($this->champs);
285
-			for ($i=0 ; $i<$count ; $i++) {
285
+			for ($i = 0; $i < $count; $i++) {
286 286
 				$datas[] = $this->champs[$i]."=:".$this->champs[$i];
287 287
 			}
288 288
 
289 289
 			//si on a des conditions alors on sera dans un insert
290
-			$requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas);
290
+			$requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas);
291 291
 
292 292
 			if (!empty($this->conditions)) {
293
-				$requete .= " WHERE " . implode(" ", $this->conditions);
293
+				$requete .= " WHERE ".implode(" ", $this->conditions);
294 294
 			}
295 295
 
296 296
 			$this->prepare($requete, $values);
@@ -301,10 +301,10 @@  discard block
 block discarded – undo
301 301
 		 * fonction utilisée pour finir un delete
302 302
 		 */
303 303
 		public function del() {
304
-			$requete = $this->req_beginning . implode(",", $this->table);
304
+			$requete = $this->req_beginning.implode(",", $this->table);
305 305
 
306 306
 			if (!empty($this->conditions)) {
307
-				$requete .= " WHERE " . implode(" ", $this->conditions);
307
+				$requete .= " WHERE ".implode(" ", $this->conditions);
308 308
 			}
309 309
 
310 310
 			$this->query($requete);
Please login to merge, or discard this patch.