@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | * @return floatfonction qui renvoi le temps qu'il faut pour effectuer une recherche |
110 | 110 | */ |
111 | 111 | private function getTempsRecherche($temps, $niveau = 0) { |
112 | - $pourcent = ($temps*Bataille::getBatiment()->getNiveauBatiment("centre_recherche")/100); |
|
112 | + $pourcent = ($temps * Bataille::getBatiment()->getNiveauBatiment("centre_recherche") / 100); |
|
113 | 113 | |
114 | 114 | if ($niveau == 0) { |
115 | - return round($temps-$pourcent);; |
|
115 | + return round($temps - $pourcent); ; |
|
116 | 116 | } |
117 | 117 | |
118 | - return round(($temps * ($this->coef_centre * $niveau))-$pourcent); |
|
118 | + return round(($temps * ($this->coef_centre * $niveau)) - $pourcent); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | $this->recherche = $obj->recherche; |
161 | 161 | $this->type = $obj->type; |
162 | 162 | |
163 | - if ($obj->date_fin-$today <= 0) { |
|
163 | + if ($obj->date_fin - $today <= 0) { |
|
164 | 164 | $this->setTerminerRecherche($obj->ID_recherche); |
165 | 165 | } |
166 | 166 | else { |
167 | 167 | $recherche = [ |
168 | 168 | "recherche" => $obj->recherche, |
169 | 169 | "type" => $obj->type, |
170 | - "date_fin_recherche" => $obj->date_fin-$today, |
|
170 | + "date_fin_recherche" => $obj->date_fin - $today, |
|
171 | 171 | "id_recherche" => $obj->ID_recherche |
172 | 172 | ]; |
173 | 173 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $fuel = Bataille::getTestAssezRessourceBase("fuel", $cout["fuel"]); |
227 | 227 | |
228 | 228 | |
229 | - if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge" ) { |
|
229 | + if (($eau["class"] || $electricite["class"] || $fer["class"] || $fuel["class"]) == "rouge") { |
|
230 | 230 | FlashMessage::setFlash("Pas assez de ressources pour effectuer cette recherche"); |
231 | 231 | return false; |
232 | 232 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | //on retire les ressources |
235 | 235 | Bataille::getRessource()->setUpdateRessource($cout["eau"], $cout["electricite"], $cout["fer"], $cout["fuel"], 0, "-"); |
236 | 236 | |
237 | - $date_fin = Bataille::getToday()+$temps_recherche; |
|
237 | + $date_fin = Bataille::getToday() + $temps_recherche; |
|
238 | 238 | |
239 | 239 | $dbc->insert("recherche", $recherche) |
240 | 240 | ->insert("type", $type) |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | ->set(); |
261 | 261 | } |
262 | 262 | else { |
263 | - $dbc->update("niveau", $niveau_recherche+1) |
|
263 | + $dbc->update("niveau", $niveau_recherche + 1) |
|
264 | 264 | ->from("_bataille_centre_recherche") |
265 | 265 | ->where("recherche", "=", $this->recherche, "AND") |
266 | 266 | ->where("type", "=", $this->type, "AND") |