Passed
Push — master ( f99231...67efd0 )
by Anthony
02:51
created
modules/bataille/app/controller/Unite.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@  discard block
 block discarded – undo
15 15
 			$query = $dbc1->select("coef_niveau_unite")->from("configuration")->where("ID_configuration", "=", 1)->get();
16 16
 
17 17
 			if ((is_array($query)) && (count($query) == 1)) {
18
-				foreach ($query as $obj) $this->coef_unite = $obj->coef_niveau_unite;
18
+				foreach ($query as $obj) {
19
+					$this->coef_unite = $obj->coef_niveau_unite;
20
+				}
19 21
 			}
20 22
 		}
21 23
 		//-------------------------- END BUILDER ----------------------------------------------------------------------------//
@@ -46,7 +48,9 @@  discard block
 block discarded – undo
46 48
 
47 49
 				$coef = $this->coef_unite*$niveau;
48 50
 
49
-				if ($niveau == 1) $coef = 1;
51
+				if ($niveau == 1) {
52
+					$coef = 1;
53
+				}
50 54
 
51 55
 				return [
52 56
 					"attaque" => round($base_carac["attaque"]*$coef),
@@ -54,8 +58,7 @@  discard block
 block discarded – undo
54 58
 					"resistance" => round($base_carac["resistance"]*$coef),
55 59
 					"vitesse" => $base_carac["vitesse"]
56 60
 				];
57
-			}
58
-			else {
61
+			} else {
59 62
 				return [];
60 63
 			}
61 64
 		}
Please login to merge, or discard this patch.