Passed
Push — master ( 05bb75...96b645 )
by Anthony
04:25
created
core/admin/navigation/menu/gestion.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,11 +5,9 @@
 block discarded – undo
5 5
 
6 6
 		if ($menu_active == "plie") {
7 7
 			$_SESSION["menu_plie".CLEF_SITE] = "deplie";
8
-		}
9
-		else {
8
+		} else {
10 9
 			$_SESSION["menu_plie".CLEF_SITE] = "plie";
11 10
 		}
12
-	}
13
-	else {
11
+	} else {
14 12
 		$_SESSION["menu_plie".CLEF_SITE] = "plie";
15 13
 	}
16 14
\ No newline at end of file
Please login to merge, or discard this patch.
installation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,12 +18,10 @@
 block discarded – undo
18 18
 
19 19
 			//si c'est un controleur de base on va cerhcer dans core/admin
20 20
 			require_once("installation/controller/".$lien.".php");
21
-		}
22
-		else {
21
+		} else {
23 22
 			require("installation/views/template/principal.php");
24 23
 		}
25
-	}
26
-	else {
24
+	} else {
27 25
 		$page = "installation/views/index";
28 26
 		require("installation/controller/initialise_all.php");
29 27
 		require("installation/views/template/principal.php");
Please login to merge, or discard this patch.
installation/controller/InstallRibs.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
 
26 26
 			try {
27 27
 				$this->dbc = new \PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass);
28
-			}
29
-			catch (\PDOException $e) {
28
+			} catch (\PDOException $e) {
30 29
 				//on tente de créer la bdd
31 30
 				$erreur = "getErreur".$e->getCode();
32 31
 				$this->$erreur();
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 	namespace core\contenus;
3 3
 
4
-	use core\functions\ChaineCaractere;
5 4
 	use core\RedirectError;
6 5
 
7 6
 
Please login to merge, or discard this patch.
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/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.
installation/controller/configuration/utilisateur.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
 		$_SESSION['acces_admin'] = $inscription->getAccesAdministration();
25 25
 		//$id_liste_droit_acces = $_SESSION['id_liste_droit_acces'];
26 26
 		\core\HTML\flashmessage\FlashMessage::setFlash("<ul>".$inscription->getErreur()."</ul>");
27
-	}
28
-	else {
27
+	} else {
29 28
 		\core\HTML\flashmessage\FlashMessage::setFlash("L'utilisateur ".$inscription->getNom()." ".$inscription->getPrenom()."a bien été inscrit", "success");
30 29
 		$inscription->setInscrireUtilisateur();
31 30
 	}
Please login to merge, or discard this patch.
core/admin/contenus/ParentTexte.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 			$query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get();
17 17
 
18 18
 			if ((is_array($query)) && (count($query) > 0)) {
19
-				foreach ($query as $obj) $this->parent_texte = $obj->titre;
19
+				foreach ($query as $obj) {
20
+					$this->parent_texte = $obj->titre;
21
+				}
20 22
 			}
21 23
 
22 24
 			return $this->parent_texte;
Please login to merge, or discard this patch.