Passed
Push — master ( 7c57b8...164b78 )
by Anthony
02:45
created
modules/bataille/app/controller/CentreRecherche.php 1 patch
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 			$query = $dbc1->select("coef_centre_recherche")->from("configuration")->where("ID_configuration", "=", 1)->get();
20 20
 
21 21
 			if ((is_array($query)) && (count($query) == 1)) {
22
-				foreach ($query as $obj) $this->coef_centre = $obj->coef_centre_recherche;
22
+				foreach ($query as $obj) {
23
+					$this->coef_centre = $obj->coef_centre_recherche;
24
+				}
23 25
 			}
24 26
 		}
25 27
 		//-------------------------- END BUILDER ----------------------------------------------------------------------------//
@@ -133,8 +135,7 @@  discard block
 block discarded – undo
133 135
 						if ($niveau > 0) {
134 136
 							$cout = $this->getCoutRecherche($cout, $niveau);
135 137
 							$temps_recherche = $this->getTempsRecherche($temps_recherche, $niveau);
136
-						}
137
-						else {
138
+						} else {
138 139
 							$niveau_recherche = 1;
139 140
 						}
140 141
 
@@ -175,8 +176,7 @@  discard block
 block discarded – undo
175 176
 						$this->setTerminerRecherche($obj->ID_recherche);
176 177
 
177 178
 						return false;
178
-					}
179
-					else {
179
+					} else {
180 180
 						$recherche = [
181 181
 							"recherche" => $obj->recherche,
182 182
 							"type" => $obj->type,
@@ -242,8 +242,7 @@  discard block
 block discarded – undo
242 242
 			if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge" ) {
243 243
 				FlashMessage::setFlash("Pas assez de ressources pour effectuer cette recherche");
244 244
 				return false;
245
-			}
246
-			else {
245
+			} else {
247 246
 				//on retire les ressources
248 247
 				Bataille::getRessource()->setUpdateRessource($cout["eau"], $cout["electricite"], $cout["fer"], $cout["fuel"], 0, "-");
249 248
 
@@ -271,8 +270,7 @@  discard block
 block discarded – undo
271 270
 					->insert("ID_base", Bataille::getIdBase())
272 271
 					->into("_bataille_centre_recherche")
273 272
 					->set();
274
-			}
275
-			else {
273
+			} else {
276 274
 				$dbc->update("niveau", $niveau_recherche+1)
277 275
 					->from("_bataille_centre_recherche")
278 276
 					->where("recherche", "=", $this->recherche, "AND")
Please login to merge, or discard this patch.