Passed
Push — master ( d27ad8...d52a81 )
by Anthony
02:58
created
modules/bataille/app/controller/Ressource.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			$last_co = new \DateTime($last_co);
98 98
 			$last_co = $last_co->getTimestamp();
99 99
 
100
-			$diff_temps = $today-$last_co;
100
+			$diff_temps = $today - $last_co;
101 101
 
102 102
 			//si la derniere actualisation ou connexion est supérieur à 30 sec
103 103
 			if ($diff_temps > 180) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		private function setAddRessource($nom_ressource, $ressrouce, $diff_temps) {
118 118
 			$dbc = App::getDb();
119 119
 
120
-			$ressource = $ressrouce+(round((Bataille::getBatiment()->getProduction($nom_ressource, $this->id_base)/3600)*$diff_temps));
120
+			$ressource = $ressrouce + (round((Bataille::getBatiment()->getProduction($nom_ressource, $this->id_base) / 3600) * $diff_temps));
121 121
 			$stockage_max = Bataille::getBatiment()->getStockageEntrepot($this->id_base);
122 122
 
123 123
 			if ($ressource > $stockage_max) {
@@ -148,18 +148,18 @@  discard block
 block discarded – undo
148 148
 
149 149
 			//soit on enelve ou on ajoute
150 150
 			if ($signe == "-") {
151
-				$eau = $this->getEau()-$eau;
152
-				$electricite = $this->getElectricite()-$electricite;
153
-				$fer = $this->getFer()-$fer;
154
-				$fuel = $this->getFuel()-$fuel;
155
-				$nourriture = $this->getNourriture()-$nourriture;
151
+				$eau = $this->getEau() - $eau;
152
+				$electricite = $this->getElectricite() - $electricite;
153
+				$fer = $this->getFer() - $fer;
154
+				$fuel = $this->getFuel() - $fuel;
155
+				$nourriture = $this->getNourriture() - $nourriture;
156 156
 			}
157 157
 			else {
158
-				$eau = $this->getEau()+$eau;
159
-				$electricite = $this->getElectricite()+$electricite;
160
-				$fer = $this->getFer()+$fer;
161
-				$fuel = $this->getFuel()+$fuel;
162
-				$nourriture = $this->getNourriture()+$nourriture;
158
+				$eau = $this->getEau() + $eau;
159
+				$electricite = $this->getElectricite() + $electricite;
160
+				$fer = $this->getFer() + $fer;
161
+				$fuel = $this->getFuel() + $fuel;
162
+				$nourriture = $this->getNourriture() + $nourriture;
163 163
 
164 164
 				$stockage_max = Bataille::getBatiment()->getStockageEntrepot();
165 165
 
Please login to merge, or discard this patch.