Passed
Push — master ( 7b8c38...909871 )
by Anthony
03:17
created
core/HTML/flashmessage/FlashMessage.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 					//definit le chemin sachant que l'on part de index.php
45 45
 					$chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
46 46
 				}
47
-				else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
47
+				else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
48 48
 					//definit le chemin sachant que l'on part de admin.php
49 49
 					$chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
50 50
 				}
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,11 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 			if ($type == "error") {
19 19
 				$icone = "<i class='fa fa-close'></i>";
20
-			}
21
-			else if ($type == "success") {
20
+			} else if ($type == "success") {
22 21
 				$icone = "<i class='fa fa-check'></i>";
23
-			}
24
-			else {
22
+			} else {
25 23
 				$icone = "<i class='fa fa-info'></i>";
26 24
 			}
27 25
 
@@ -43,12 +41,10 @@  discard block
 block discarded – undo
43 41
 				if (strstr($_SERVER['SCRIPT_NAME'], "index.php")) {
44 42
 					//definit le chemin sachant que l'on part de index.php
45 43
 					$chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
46
-				}
47
-				else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
44
+				} else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
48 45
 					//definit le chemin sachant que l'on part de admin.php
49 46
 					$chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
50
-				}
51
-				else {
47
+				} else {
52 48
 					//definit le chemin sachant que l'on part de admin.php
53 49
 					$chemin = str_replace("\\", "/", str_replace("admin.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
54 50
 				}
Please login to merge, or discard this patch.
installation/controller/bdd/install.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 (isset($_POST['admin'])) {
9 9
 		Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator");
10
-	}
11
-	else {
10
+	} else {
12 11
 		Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php");
13 12
 	}
14 13
 ?>
15 14
\ No newline at end of file
Please login to merge, or discard this patch.
installation/controller/configuration/utilisateur.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 (isset($_POST['admin'])) {
9 9
 		Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator");
10
-	}
11
-	else {
10
+	} else {
12 11
 		Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php");
13 12
 	}
14 13
 ?>
15 14
\ No newline at end of file
Please login to merge, or discard this patch.
installation/controller/InstallUtilisateur.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 				foreach ($query as $obj) {
22 22
 					$params = $obj->mdp_params;
23 23
 				}
24
-			}
25
-			else {
24
+			} else {
26 25
 				$params = self::$params;
27 26
 			}
28 27
 
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
 
75 74
 			if ($id_identite != null) {
76 75
 				self::setSaveParams("$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20), $id_identite);
77
-			}
78
-			else {
76
+			} else {
79 77
 				self::$params = "$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20);
80 78
 			}
81 79
 
Please login to merge, or discard this patch.
installation/controller/initialise_all.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
 			$db_user = $_SESSION['db_user'];
10 10
 			$db_pass = $_SESSION['db_pass'];
11 11
 			unset($_SESSION['err_db']);
12
-		}
13
-		else {
12
+		} else {
14 13
 			$db_type = null;
15 14
 			$db_host = null;
16 15
 			$db_name = null;
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
 			$mail_administrateur = $_SESSION['mail_administrateur'];
29 28
 
30 29
 			unset($_SESSION['err_config']);
31
-		}
32
-		else {
30
+		} else {
33 31
 			$nom_site = null;
34 32
 			$url_site = null;
35 33
 			$gerant_site = null;
@@ -45,8 +43,7 @@  discard block
 block discarded – undo
45 43
 			$pseudo = $_SESSION['pseudo'];
46 44
 
47 45
 			unset($_SESSION['err_user']);
48
-		}
49
-		else {
46
+		} else {
50 47
 			$nom = null;
51 48
 			$prenom = null;
52 49
 			$pseudo = null;
Please login to merge, or discard this patch.
core/admin/contenus/GestionContenus.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,13 +75,13 @@
 block discarded – undo
75 75
 		}
76 76
 
77 77
 		/**
78
-		 * @param $nom_table
79
-		 * @param $nom_id_table
80
-		 * @param $champ
78
+		 * @param string $nom_table
79
+		 * @param string $nom_id_table
80
+		 * @param string $champ
81 81
 		 * @param $value
82
-		 * @param $limit_char
83
-		 * @param $err_char
84
-		 * @param $err_egalite
82
+		 * @param integer $limit_char
83
+		 * @param string $err_char
84
+		 * @param string $err_egalite
85 85
 		 * @param null $value_id_table
86 86
 		 * @return string
87 87
 		 * fonction qui permet de vérifier qu'il n'y ait pas d'erreur dans le champ spécifié ni de doublons
Please login to merge, or discard this patch.
Braces   +9 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@  discard block
 block discarded – undo
23 23
 			$query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get();
24 24
 
25 25
 			if ((is_array($query)) && (count($query) > 0)) {
26
-				foreach ($query as $obj) $this->parent_texte = $obj->titre;
26
+				foreach ($query as $obj) {
27
+					$this->parent_texte = $obj->titre;
28
+				}
27 29
 			}
28 30
 
29 31
 			return $this->parent_texte;
@@ -92,8 +94,7 @@  discard block
 block discarded – undo
92 94
 			if (strlen(utf8_decode($value)) > $limit_char) {
93 95
 				self::$erreur = true;
94 96
 				return "<li>$err_char</li>";
95
-			}
96
-			else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) {
97
+			} else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) {
97 98
 				self::$erreur = true;
98 99
 				return "<li>$err_egalite</li>";
99 100
 			}
@@ -175,13 +176,11 @@  discard block
 block discarded – undo
175 176
 					if ($parent != "") {
176 177
 						$this->setAjoutLienNavigation("ID_page", $this->id_page, 1);
177 178
 					}
178
-				}
179
-				else {
179
+				} else {
180 180
 					FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur.");
181 181
 					$this->erreur = true;
182 182
 				}
183
-			}
184
-			else {
183
+			} else {
185 184
 				$this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page);
186 185
 			}
187 186
 		}
@@ -244,8 +243,7 @@  discard block
 block discarded – undo
244 243
 						->set();
245 244
 
246 245
 					$this->setModifierLienNavigation("ID_page", $id_page, $this->getParentId($parent), $affiche);
247
-				}
248
-				else {
246
+				} else {
249 247
 					$this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page);
250 248
 				}
251 249
 			}
@@ -294,8 +292,7 @@  discard block
 block discarded – undo
294 292
 					FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème");
295 293
 					$this->erreur = true;
296 294
 				}
297
-			}
298
-			else {
295
+			} else {
299 296
 				FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème");
300 297
 				$this->erreur = true;
301 298
 			}
@@ -321,8 +318,7 @@  discard block
 block discarded – undo
321 318
 			if ($parent != "") {
322 319
 				$nav = new Navigation();
323 320
 				$nav->setSupprimerLien($id, $id_page);
324
-			}
325
-			else if (($affiche == 1) && ($parent == "")) {
321
+			} else if (($affiche == 1) && ($parent == "")) {
326 322
 				$this->setAjoutLienNavigation($id, $id_page, $affiche);
327 323
 			}
328 324
 		}
Please login to merge, or discard this patch.