Passed
Branch master (ef3387)
by Anthony
09:36
created
modules/bataille/app/views/aide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php require_once("nav.php");?>
1
+<?php require_once("nav.php"); ?>
2 2
 
3 3
 <h1>Bienvenue sur la page d'aide</h1>
4 4
 
Please login to merge, or discard this patch.
modules/bataille/app/views/popup_listebatiments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 <!--<p>Si vous supprimez ce module, tous les contenus, images qui y sont associés seront supprimés<br/></p>
3 3
 <p class="attention">Cette action est irréverssible !</p>-->
4 4
 
5
-<?php for ($i=0 ; $i<$all_batiment ; $i++):?>
5
+<?php for ($i = 0; $i < $all_batiment; $i++):?>
6 6
 	<div>
7 7
 		<p><?=$batiments[$i][1]?></p>
8 8
 		<ul>
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		<a nom_batiment="<?=$batiments[$i][1]?>" emplacement="<?=$_POST['emplacement']?>" nom_batiment_sql="<?=$batiments[$i][0]?>" class="construire <?=$batiments[$i][2][0][1]?> <?=$batiments[$i][2][1][1]?> <?=$batiments[$i][2][2][1]?> <?=$batiments[$i][2][3][1]?>" href="">Construire le batiment</a>
16 16
 		<hr>
17 17
 	</div>
18
-<?php endfor;?>
18
+<?php endfor; ?>
19 19
 
20 20
 
21
-<?php require_once(MODULEROOT."bataille/app/views/js/construire_batiment.php");?>
22 21
\ No newline at end of file
22
+<?php require_once(MODULEROOT."bataille/app/views/js/construire_batiment.php"); ?>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
modules/bataille/app/views/popup_unbatiment.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 <h3>Niveau : <?=Bataille::getBatiment()->getNiveau()?></h3>
4 4
 
5 5
 <hr>
6
-<?php if ($max_level == false){?>
6
+<?php if ($max_level == false) {?>
7 7
 <h2>Cout pour le prochain niveau</h2>
8
-<h3>Niveau suivant : <?=Bataille::getBatiment()->getNiveau()+1?></h3>
8
+<h3>Niveau suivant : <?=Bataille::getBatiment()->getNiveau() + 1?></h3>
9 9
 <ul>
10 10
 	<li class="<?=Bataille::getBatiment()->getRessourceConstruire()[0][1]?>">fer : <?=Bataille::getBatiment()->getRessourceConstruire()[0][0]?></li>
11 11
 	<li class="<?=Bataille::getBatiment()->getRessourceConstruire()[1][1]?>">fuel :<?=Bataille::getBatiment()->getRessourceConstruire()[1][0]?></li>
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 <p>L'addon permet d'améliorer la production de ce bâtiment !</p>
34 34
 
35 35
 <h2>Cout pour le prochain niveau</h2>
36
-<h3>Niveau suivant : <?=Bataille::getBatiment()->getNiveau()+1?></h3>
36
+<h3>Niveau suivant : <?=Bataille::getBatiment()->getNiveau() + 1?></h3>
37 37
 <ul>
38 38
 	<li class="<?=Bataille::getBatiment()->getRessourceConstruire()[0][1]?>">fer : <?=Bataille::getBatiment()->getRessourceConstruire()[0][0]?></li>
39 39
 	<li class="<?=Bataille::getBatiment()->getRessourceConstruire()[1][1]?>">fuel :<?=Bataille::getBatiment()->getRessourceConstruire()[1][0]?></li>
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 <h4><?=Bataille::getBatiment()->getInfoBatiment()?></h4>
46 46
 
47
-<a nom_batiment="<?=$_POST['nom_batiment']. " addon"?>"
47
+<a nom_batiment="<?=$_POST['nom_batiment']." addon"?>"
48 48
    emplacement="<?=$_POST['emplacement']?>"
49 49
    nom_batiment_sql="<?=Bataille::getBatiment()->getNomBatimentSql()?>"
50 50
    class="construire <?=Bataille::getBatiment()->getRessourceConstruire()[0][1]?>
@@ -57,4 +57,4 @@  discard block
 block discarded – undo
57 57
 <!-- partie quand le batiment est au lvl max -->
58 58
 <p>Le batiment a atteint son niveau maxiumum</p>
59 59
 <?php }?>
60
-<?php require_once(MODULEROOT."bataille/app/views/js/construire_batiment.php");?>
61 60
\ No newline at end of file
61
+<?php require_once(MODULEROOT."bataille/app/views/js/construire_batiment.php"); ?>
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
modules/bataille/app/controller/Bataille.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		
25 25
 		//-------------------------- GETTER ----------------------------------------------------------------------------//
26 26
 		public static function getValues() {
27
-		    return ["bataille" => self::$values];
27
+			return ["bataille" => self::$values];
28 28
 		}
29 29
 
30 30
 		//initilisation of all classes of battle
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
 		public static function getTestAssezRessourceBase($nom_ressource, $ressource) {
121 121
 			$f = "get".ucfirst($nom_ressource);
122 122
 
123
-			if ($ressource >  Bataille::getRessource()->$f()) {
123
+			if ($ressource > Bataille::getRessource()->$f()) {
124 124
 				/*echo("$nom_ressource $ressource ".Bataille::getRessource()->getEau()." ---");*/
125 125
 				return [$ressource, "rouge"];
126 126
 			}
Please login to merge, or discard this patch.
modules/bataille/app/controller/Base.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 		//-------------------------- GETTER ----------------------------------------------------------------------------//
17 17
 		public function getBatiments(){
18
-		    return $this->batiments;
18
+			return $this->batiments;
19 19
 		}
20 20
 
21 21
 		/**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 
16 16
 		//-------------------------- GETTER ----------------------------------------------------------------------------//
17
-		public function getBatiments(){
17
+		public function getBatiments() {
18 18
 		    return $this->batiments;
19 19
 		}
20 20
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 			$nombre_emplacement = Bataille::getNombreEmplacementBase();
68 68
 
69
-			for ($i=1 ; $i<($nombre_emplacement+1) ; $i++) {
69
+			for ($i = 1; $i < ($nombre_emplacement + 1); $i++) {
70 70
 				$query = $dbc->select()->from("_bataille_batiment")->where("ID_base", "=", Bataille::getIdBase(), "AND")
71 71
 					->where("emplacement", "=", $i)
72 72
 					->orderBy("emplacement")
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
 								"niveau" => $obj->niveau,
82 82
 								"emplacement" => $i
83 83
 							];
84
-						}
85
-						else {
84
+						} else {
86 85
 							$batiments[] = [
87 86
 								"nom_batiment" => $obj->nom_batiment,
88 87
 								"nom_batiment_sql" => $obj->nom_batiment_sql,
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
 							];
92 91
 						}
93 92
 					}
94
-				}
95
-				else {
93
+				} else {
96 94
 					$batiments[] = [
97 95
 						"nom_batiment" => "A construire",
98 96
 						"nom_batiment_sql" => "a_construire",
Please login to merge, or discard this patch.
modules/bataille/app/controller/Ressource.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			$last_co = new \DateTime($last_co);
86 86
 			$last_co = $last_co->getTimestamp();
87 87
 
88
-			$diff_temps = $today-$last_co;
88
+			$diff_temps = $today - $last_co;
89 89
 
90 90
 			//si la derniere actualisation ou connexion est supérieur à 30 sec
91 91
 			if ($diff_temps > 180) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		private function setAddRessource($nom_ressource, $ressrouce, $diff_temps) {
106 106
 			$dbc = App::getDb();
107 107
 
108
-			$ressource = $ressrouce+(round((Bataille::getBatiment()->getProduction($nom_ressource)/3600)*$diff_temps));
108
+			$ressource = $ressrouce + (round((Bataille::getBatiment()->getProduction($nom_ressource) / 3600) * $diff_temps));
109 109
 			$stockage_max = Bataille::getBatiment()->getStockageEntrepot();
110 110
 
111 111
 			if ($ressource > $stockage_max) {
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
 		public function setRetirerRessource($eau, $electricite, $fer, $fuel, $nourriture) {
134 134
 			$dbc = App::getDb();
135 135
 
136
-			$eau = $this->getEau()-$eau;
137
-			$electricite = $this->getElectricite()-$electricite;
138
-			$fer = $this->getFer()-$fer;
139
-			$fuel = $this->getFuel()-$fuel;
140
-			$nourriture = $this->getNourriture()-$nourriture;
136
+			$eau = $this->getEau() - $eau;
137
+			$electricite = $this->getElectricite() - $electricite;
138
+			$fer = $this->getFer() - $fer;
139
+			$fuel = $this->getFuel() - $fuel;
140
+			$nourriture = $this->getNourriture() - $nourriture;
141 141
 
142 142
 
143 143
 			$dbc->update("eau", $eau)
Please login to merge, or discard this patch.
modules/bataille/app/controller/initialise/popup_unbatiment.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 
6 6
 	if (Bataille::getBatiment()->getUnBatiment($_POST['nom_batiment'], $_POST['emplacement']) == 0) {
7 7
 		$max_level = true;
8
-	}
9
-	else {
8
+	} else {
10 9
 		$max_level = false;
11 10
 	}
12 11
\ No newline at end of file
Please login to merge, or discard this patch.
modules/messagerie/router/routes.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
 			$this->controller = "messagerie/app/controller/initialise/message.php";
28 28
 			\modules\messagerie\app\controller\Messagerie::$url_message = $this->parametre;
29 29
 		}
30
-	}
31
-	else {
30
+	} else {
32 31
 		\core\HTML\flashmessage\FlashMessage::setFlash("L'accès à ce module n'est pas configurer ou ne fais pas partie de votre offre, contactez votre administrateur pour résoudre ce problème", "info");
33 32
 		header("location:".WEBROOT);
34 33
 	}
35 34
\ No newline at end of file
Please login to merge, or discard this patch.
modules/messagerie/app/controller/Messagerie.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 			return $this->message;
77 77
 		}
78 78
 		public function getDateMessage(){
79
-		    return $this->date_message;
79
+			return $this->date_message;
80 80
 		}
81 81
 		public function getUrl(){
82
-		    return $this->url;
82
+			return $this->url;
83 83
 		}
84 84
 		public function getIdExpediteur() {
85 85
 			return $this->id_expediteur;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			return $this->pseudo_receveur;
95 95
 		}
96 96
 		public function getValues(){
97
-		    return ["messagerie" => $this->values];
97
+			return ["messagerie" => $this->values];
98 98
 		}
99 99
 
100 100
 		/**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 		public function getMessage() {
76 76
 			return $this->message;
77 77
 		}
78
-		public function getDateMessage(){
78
+		public function getDateMessage() {
79 79
 		    return $this->date_message;
80 80
 		}
81
-		public function getUrl(){
81
+		public function getUrl() {
82 82
 		    return $this->url;
83 83
 		}
84 84
 		public function getIdExpediteur() {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		public function getPseudoReceveur() {
94 94
 			return $this->pseudo_receveur;
95 95
 		}
96
-		public function getValues(){
96
+		public function getValues() {
97 97
 		    return ["messagerie" => $this->values];
98 98
 		}
99 99
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,11 +32,9 @@  discard block
 block discarded – undo
32 32
 			if ($type_boite !== null) {
33 33
 				if ($type_boite == "boite réception") {
34 34
 					$this->getBoiteReception();
35
-				}
36
-				else if ($type_boite == "messages envoyés") {
35
+				} else if ($type_boite == "messages envoyés") {
37 36
 					$this->getMessagesEnvoyes();
38
-				}
39
-				else if ($type_boite == "messages supprimés") {
37
+				} else if ($type_boite == "messages supprimés") {
40 38
 					$this->getMessageSupprimes();
41 39
 				}
42 40
 
@@ -228,8 +226,7 @@  discard block
 block discarded – undo
228 226
 						"url" => $obj->url
229 227
 					];
230 228
 				}
231
-			}
232
-			else {
229
+			} else {
233 230
 				return false;
234 231
 			}
235 232
 		}
Please login to merge, or discard this patch.