Passed
Push — master ( 81c734...db3018 )
by Anthony
03:33
created
core/admin/droitsacces/initialise/ajout_modification.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,11 +2,9 @@
 block discarded – undo
2 2
 	if (isset($_SESSION['err_modification_droitsacces'])) {
3 3
 
4 4
 		unset($_SESSION['err_modification_droitsacces']);
5
-	}
6
-	else if ($page == "gestion-droits-acces/modifier-liste") {
5
+	} else if ($page == "gestion-droits-acces/modifier-liste") {
7 6
 		$gestion_droit_acces = new \core\admin\droitsacces\GestionDroitAcces($_GET['id_liste']);
8
-	}
9
-	else {
7
+	} else {
10 8
 		$balise_title = null;
11 9
 		$url = null;
12 10
 		$meta_description = null;
Please login to merge, or discard this patch.
core/iniparser/IniParser.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
 		public function getParse($file) {
16 16
 			if (file_exists($file)) {
17 17
 				return parse_ini_file($file);
18
-			}
19
-			else {
18
+			} else {
20 19
 				return false;
21 20
 			}
22 21
 		}
@@ -34,8 +33,7 @@  discard block
 block discarded – undo
34 33
 		public function setModifierConfigIni($developpement, $dev_info, $prod_info) {
35 34
 			if ($developpement == "on") {
36 35
 				$developpement = 1;
37
-			}
38
-			else {
36
+			} else {
39 37
 				$developpement = 0;
40 38
 			}
41 39
 
Please login to merge, or discard this patch.
core/auth/Encrypt.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 						$params = $obj->mdp_params;
29 29
 					}
30 30
 				}
31
-			}
32
-			else {
31
+			} else {
33 32
 				$params = self::$params;
34 33
 			}
35 34
 
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
 
82 81
 			if ($id_identite != null) {
83 82
 				self::setSaveParams("$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20), $id_identite);
84
-			}
85
-			else {
83
+			} else {
86 84
 				self::$params = "$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20);
87 85
 			}
88 86
 
Please login to merge, or discard this patch.
core/auth/connexion/login.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 	if (isset($_POST['admin'])) {
6 6
 		\core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator", 0);
7
-	}
8
-	else {
7
+	} else {
9 8
 		\core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php", 0);
10 9
 	}
11 10
\ No newline at end of file
Please login to merge, or discard this patch.
core/auth/mdp/changer_mdp.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,20 +13,17 @@
 block discarded – undo
13 13
 		if ($membre->getErreur() != "") {
14 14
 			FlashMessage::setFlash($membre->getErreur());
15 15
 			header("location:".ADMWEBROOT."configuration/mon-compte");
16
-		}
17
-		else {
16
+		} else {
18 17
 			\core\auth\Connexion::setDeconnexion(WEBROOT."administrator/login");
19 18
 			FlashMessage::setFlash("Votre mot de passe a été changé avec succès, vous pouvez vous reconnecter avec votre nouveau mot de passe", "info");
20 19
 		}
21
-	}
22
-	else {
20
+	} else {
23 21
 		$membre->setMdp($mdp, $new_mdp, $verif_new_mdp);
24 22
 
25 23
 		if ($membre->getErreur() != "") {
26 24
 			FlashMessage::setFlash($membre->getErreur());
27 25
 			header("location:index.php");
28
-		}
29
-		else {
26
+		} else {
30 27
 			\core\auth\Connexion::setDeconnexion("index.php?page=login");
31 28
 			FlashMessage::setFlash("Votre mot de passe a été changé avec succès, vous pouvez vous reconnecter avec votre nouveau mot de passe", "info");
32 29
 		}
Please login to merge, or discard this patch.
core/Navigation.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 			if ($no_module === null) {
23 23
 				$query = $dbc->select()->from("navigation")->orderBy("ordre")->get();
24
-			}
25
-			else {
24
+			} else {
26 25
 				$query = $dbc->select()->from("navigation")->where("ID_page", " IS NOT ", "NULL", "", true)->orderBy("ordre")->get();
27 26
 			}
28 27
 
@@ -30,8 +29,7 @@  discard block
 block discarded – undo
30 29
 				foreach ($query as $obj) {
31 30
 					if ($obj->ID_page === null) {
32 31
 						$navigation[] = $this->getLienNavigationModule($obj->ID_module);
33
-					}
34
-					else {
32
+					} else {
35 33
 						$navigation[] = $this->getLienNavigationPage($obj->ID_page);
36 34
 					}
37 35
 					$last_ordre = $obj->ordre;
@@ -138,8 +136,7 @@  discard block
 block discarded – undo
138 136
 		private function getLienPage($url) {
139 137
 			if (ChaineCaractere::FindInString($url, "http://")) {
140 138
 				return $url;
141
-			}
142
-			else {
139
+			} else {
143 140
 				return WEBROOT.$url;
144 141
 			}
145 142
 		}
Please login to merge, or discard this patch.
core/form/support/envoyer_message.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.
core/RedirectError.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.
config/initialise.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	if (!isset($page_root)) $page_root = "index.php";
2
+	if (!isset($page_root)) {
3
+		$page_root = "index.php";
4
+	}
3 5
 
4 6
 	//-------------------------- CONSTANTE POUR LES ROUTES ----------------------------------------------------------------------------//
5 7
 	//definit le chemin vers la racine du projet (depuis racine serveur web
@@ -46,15 +48,13 @@  discard block
 block discarded – undo
46 48
 		if (($ini["installation"] == 1) && ($page_root != "installation.php")) {
47 49
 			header("location:".WEBROOT."installation-ribs");
48 50
 		}
49
-	}
50
-	else {
51
+	} else {
51 52
 		header("location:".WEBROOT."installation");
52 53
 	}
53 54
 
54 55
 	if ($ini["developpment"] == 1) {
55 56
 		$tab = "dev";
56
-	}
57
-	else {
57
+	} else {
58 58
 		$tab = "prod";
59 59
 	}
60 60
 
Please login to merge, or discard this patch.