Passed
Push — master ( 752008...2e6f71 )
by Anthony
02:31
created
modules/messagerie/app/controller/message/envoyer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 
8 8
 	if ($validator->getErrors() !== null) {
9 9
 		\core\HTML\flashmessage\FlashMessage::setFlash($validator->getErrors());
10
-	}
11
-	else {
10
+	} else {
12 11
 		$type = $_POST["type"];
13 12
 		$objet = $_POST['objet']." de la part de ".$_SERVER['HTTP_HOST'];
14 13
 		$demande = $_POST['demande'];
Please login to merge, or discard this patch.
modules/bataille/app/controller/Aide.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,19 +87,19 @@
 block discarded – undo
87 87
 		 * renvoi le ou les batiments nécéssaires pour la construction du batiment spécifié
88 88
 		 */
89 89
 		private function getPourConstruire($pour_construire) {
90
-			for ($i=0 ; $i<count($pour_construire) ; $i++) {
90
+			for ($i = 0; $i < count($pour_construire); $i++) {
91 91
 				//si plusieur batiment pour construire le batiment en question
92 92
 				$count = count($pour_construire[$i]);
93 93
 				if ($count > 1) {
94
-					for ($j=0 ; $j<$count ; $j++) {
95
-						$batiment[] =  [
94
+					for ($j = 0; $j < $count; $j++) {
95
+						$batiment[] = [
96 96
 							"nom_batiment" => $pour_construire[$i][$j][0],
97 97
 							"niveau_batiment" => $pour_construire[$i][$j][2]
98 98
 						];
99 99
 					}
100 100
 				}
101 101
 				else {
102
-					$batiment[] =  [
102
+					$batiment[] = [
103 103
 						"nom_batiment" => $pour_construire[$i][0][0],
104 104
 						"niveau_batiment" => $pour_construire[$i][0][2]
105 105
 					];
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 								$pour_construire[] = unserialize($obj->pour_construire);
44 44
 
45 45
 								$pour_construire = $this->getPourConstruire($pour_construire);
46
-							}
47
-							else {
46
+							} else {
48 47
 								$pour_construire = [];
49 48
 							}
50 49
 
@@ -97,8 +96,7 @@  discard block
 block discarded – undo
97 96
 							"niveau_batiment" => $pour_construire[$i][$j][2]
98 97
 						];
99 98
 					}
100
-				}
101
-				else {
99
+				} else {
102 100
 					$batiment[] =  [
103 101
 						"nom_batiment" => $pour_construire[$i][0][0],
104 102
 						"niveau_batiment" => $pour_construire[$i][0][2]
Please login to merge, or discard this patch.
modules/bataille/app/controller/Map.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
 
31 31
 			if (((is_array($query)) && (count($query) > 0)) || ($controller !== false)) {
32 32
 				return true;
33
-			}
34
-			else {
33
+			} else {
35 34
 				$router = new RouterModule();
36 35
 
37 36
 				if ($router->getRouteModuleExist($url) !== true) {
Please login to merge, or discard this patch.
modules/bataille/app/controller/Points.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		//-------------------------- SETTER ----------------------------------------------------------------------------//
50 50
 		/**
51 51
 		 * @param $id_base
52
-		 * @param $type
52
+		 * @param string $type
53 53
 		 * fonction qui ajoute des points à la base en fonction du type
54 54
 		 * le type peut etre : batiment, attaque, defense, troupe
55 55
 		 */
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
41 41
 			
42 42
 			$query = $dbc->select("points_batiment")->from("configuration")->where("ID_configuration", "=", 1)->get();
43 43
 			
44
-			foreach ($query as $obj) return $obj->points_batiment;
44
+			foreach ($query as $obj) {
45
+				return $obj->points_batiment;
46
+			}
45 47
 		}
46 48
 		//-------------------------- END GETTER ----------------------------------------------------------------------------//
47 49
 		
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 			$dbc = App::getDb();
58 58
 			
59 59
 			if ($type == "batiment") {
60
-				$points = self::getPointsBase($id_base)+self::getPointAjoutBatiment();
60
+				$points = self::getPointsBase($id_base) + self::getPointAjoutBatiment();
61 61
 				
62 62
 			}
63 63
 			
Please login to merge, or discard this patch.
modules/bataille/app/controller/Marche.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 			echo $this->date_arrivee."<br>";
65 65
 
66 66
 			//on test si déja arrivé à destination
67
-			if (($this->aller == 1) && (($this->date_arrivee-$today) <= 0)) {echo("dgd");
67
+			if (($this->aller == 1) && (($this->date_arrivee - $today) <= 0)) {echo("dgd");
68 68
 				$this->setLivrerRessource();
69 69
 
70 70
 				//on calcul la date d'arrivée du retour
71
-				$date_retour = Bataille::getDureeTrajet($this->id_base_dest)+$this->date_arrivee;
71
+				$date_retour = Bataille::getDureeTrajet($this->id_base_dest) + $this->date_arrivee;
72 72
 
73 73
 				echo "date retour = ".$date_retour;
74 74
 
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 
83 83
 
84 84
 			}
85
-			else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) {
85
+			else if (($this->aller == 0) && (($this->date_arrivee - $today) <= 0)) {
86 86
 
87 87
 			}
88 88
 			else {
89
-				$this->duree_restante_trajet = $this->date_arrivee-$today;
89
+				$this->duree_restante_trajet = $this->date_arrivee - $today;
90 90
 			}
91 91
 		}
92 92
 		//-------------------------- END GETTER ----------------------------------------------------------------------------//
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 							"date_arrivee" => $this->duree_restante_trajet,
39 39
 							"nom_base_dest" => $obj->nom_base
40 40
 						];
41
-					}
42
-					else {
41
+					} else {
43 42
 						$marche["retour"][] = [
44 43
 							"id_marche_transport" => $obj->ID_marche_transport,
45 44
 							"date_arrivee" => $this->duree_restante_trajet,
@@ -75,17 +74,14 @@  discard block
 block discarded – undo
75 74
 				//si le retour du trajet est également arrivé on finit le transport
76 75
 				if ($date_retour < $today) {
77 76
 					$this->setTerminerTransport();
78
-				}
79
-				else {
77
+				} else {
80 78
 
81 79
 				}
82 80
 
83 81
 
84
-			}
85
-			else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) {
82
+			} else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) {
86 83
 
87
-			}
88
-			else {
84
+			} else {
89 85
 				$this->duree_restante_trajet = $this->date_arrivee-$today;
90 86
 			}
91 87
 		}
Please login to merge, or discard this patch.