Passed
Push — master ( 1c7663...341095 )
by Anthony
02:41
created
modules/bataille/app/controller/marche/envoyer_ressources.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2
-	$marche =  new \modules\bataille\app\controller\Marche();
2
+	$marche = new \modules\bataille\app\controller\Marche();
3 3
 
4 4
 	$marche->setCommencerTransport($_POST['eau'], $_POST['electricite'], $_POST['fer'], $_POST['fuel'], $_POST['nourriture'], $_POST['posx'], $_POST['posy']);
5 5
\ No newline at end of file
Please login to merge, or discard this patch.
modules/bataille/app/controller/Marche.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 			echo $this->date_arrivee."<br>";
59 59
 
60 60
 			//on test si déja arrivé à destination
61
-			if (($this->aller == 1) && (($this->date_arrivee-$today) <= 0)) {
61
+			if (($this->aller == 1) && (($this->date_arrivee - $today) <= 0)) {
62 62
 				$this->setLivrerRessource();
63 63
 
64 64
 				//on calcul la date d'arrivée du retour
65
-				$date_retour = Bataille::getDureeTrajet($this->id_base_dest)+$this->date_arrivee;
65
+				$date_retour = Bataille::getDureeTrajet($this->id_base_dest) + $this->date_arrivee;
66 66
 
67 67
 				//si le retour du trajet est également arrivé on finit le transport sinon on le place sur le retour
68 68
 				if ($date_retour < $today) {
@@ -70,15 +70,15 @@  discard block
 block discarded – undo
70 70
 				}
71 71
 				else {
72 72
 					$this->setTrajetRetour($date_retour);
73
-					$this->duree_restante_trajet = $date_retour-$today;
73
+					$this->duree_restante_trajet = $date_retour - $today;
74 74
 					$set_array = true;
75 75
 				}
76 76
 			}
77
-			else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) {
77
+			else if (($this->aller == 0) && (($this->date_arrivee - $today) <= 0)) {
78 78
 				$this->setTerminerTransport();
79 79
 			}
80 80
 			else {
81
-				$this->duree_restante_trajet = $this->date_arrivee-$today;
81
+				$this->duree_restante_trajet = $this->date_arrivee - $today;
82 82
 				$set_array = true;
83 83
 			}
84 84
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 				//si pas assez de ressources dispo dans la base pour l'envoi on renvoi erreur
156 156
 				foreach ($ressource as $tab) {
157
-					if (in_array("rouge", $tab)) {echo $posy;echo $posx;
157
+					if (in_array("rouge", $tab)) {echo $posy; echo $posx;
158 158
 						FlashMessage::setFlash("Vous n'avez pas autant de ressources disponibles à l'envoi");
159 159
 						return false;
160 160
 					};
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 				//sinon initialise le transport
164 164
 				//on recup la date d'arrivee dans la base de destintation
165
-				$date_arrivee = Bataille::getDureeTrajet($id_base_dest)+Bataille::getToday();
165
+				$date_arrivee = Bataille::getDureeTrajet($id_base_dest) + Bataille::getToday();
166 166
 
167 167
 
168 168
 				echo("<pre>");
Please login to merge, or discard this patch.