Passed
Push — master ( 9c6704...e16eca )
by Anthony
02:58
created
modules/bataille/app/controller/GroupeUnite.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 		 * @param $nom_unite
66 66
 		 * @param $type_unite
67 67
 		 * @param $nom_groupe
68
-		 * @return bool
68
+		 * @return false|null
69 69
 		 * fonction qui permet de créer un groupe
70 70
 		 */
71 71
 		public function setCreerGroupe($nombre_unite, $nom_unite, $type_unite, $nom_groupe) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 			
87 87
 			$count = count($nombre_unite);
88 88
 			
89
-			for ($i=0 ; $i<$count ; $i++) {
89
+			for ($i = 0; $i < $count; $i++) {
90 90
 				$this->setAjouterUniteGroupe($nombre_unite[$i], $nom_unite[$i], $type_unite[$i], $id_groupe);
91 91
 			}
92 92
 		}
Please login to merge, or discard this patch.
modules/bataille/app/controller/Unite.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 			$unites = Bataille::getCentreRecherche()->getAllRechercheType($type);
89 89
 
90 90
 			//recupérer les caractéristiques de l'unité en question
91
-			for ($i=0 ; $i<count($unites) ; $i++) {
91
+			for ($i = 0; $i < count($unites); $i++) {
92 92
 				$unites[$i] += $this->getCaracteristiqueUnite($unites[$i]["recherche"], $unites[$i]["niveau"], $type);
93 93
 				$unites[$i] += ["type" => $type];
94 94
 			}
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 			$count_type = count($types);
140 140
 			$unites = [];
141 141
 
142
-			for ($i=0 ; $i<$count_type ; $i++) {
142
+			for ($i = 0; $i < $count_type; $i++) {
143 143
 				$type_unite = $this->getAllUniteType($types[$i], $id_base, $id_groupe);
144 144
 
145 145
 				$unites = array_merge($unites, $type_unite);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 			$fuel = Bataille::getTestAssezRessourceBase("fuel", $retirer_fuel);
301 301
 
302 302
 
303
-			if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge" ) {
303
+			if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge") {
304 304
 				FlashMessage::setFlash("Pas assez de ressources pour recruter autant d'unités");
305 305
 				return false;
306 306
 			}
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 				//on retire les ressources
309 309
 				Bataille::getRessource()->setUpdateRessource($retirer_eau, $retirer_electricite, $retirer_fer, $retirer_fuel, 0, "-");
310 310
 
311
-				$date_fin = Bataille::getToday()+($this->temps_recrutement *$nombre);
311
+				$date_fin = Bataille::getToday()+($this->temps_recrutement*$nombre);
312 312
 
313 313
 				$dbc->insert("nom", $nom)
314 314
 					->insert("type", $type)
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 					$type = $obj->type;
340 340
 				}
341 341
 
342
-				for ($i=0 ; $i<$nombre ; $i++) {
342
+				for ($i = 0; $i < $nombre; $i++) {
343 343
 					$dbc->insert("nom", $nom)
344 344
 						->insert("type", $type)
345 345
 						->insert("ID_base", Bataille::getIdBase())
Please login to merge, or discard this patch.