Passed
Push — master ( 195a04...6981f0 )
by Anthony
03:06
created
core/Navigation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 			if($no_module === null) {
16 16
 				$query = $dbc->select()->from("navigation")->orderBy("ordre")->get();
17
-			}
18
-			else {
17
+			} else {
19 18
 				$query = $dbc->select()->from("navigation")->where("ID_page", " IS NOT ", "NULL")->orderBy("ordre")->get();
20 19
 			}
21 20
 
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
 				foreach ($query as $obj) {
24 23
 					if ($obj->ID_page === null) {
25 24
 						$navigation[] = $this->getLienNavigationModule($obj->ID_module);
26
-					}
27
-					else {
25
+					} else {
28 26
 						$navigation[] = $this->getLienNavigationPage($obj->ID_page);
29 27
 					}
30 28
 					$last_ordre = $obj->ordre;
Please login to merge, or discard this patch.
core/modules/GestionModule.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,8 +130,7 @@  discard block
 block discarded – undo
130 130
 				foreach ($query as $obj) {
131 131
 					if ($obj->activer == 1) {
132 132
 						return true;
133
-					}
134
-					else {
133
+					} else {
135 134
 						return false;
136 135
 					}
137 136
 				}
@@ -183,8 +182,7 @@  discard block
 block discarded – undo
183 182
 
184 183
 			if ($activer == 1) {
185 184
 				$nav->setAjoutLien("ID_module", self::getUrlToId($url));
186
-			}
187
-			else {
185
+			} else {
188 186
 				$nav->setSupprimerLien("ID_module", self::getUrlToId($url));
189 187
 			}
190 188
 		}
Please login to merge, or discard this patch.
core/admin/inscription/AdminInscription.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,12 +36,10 @@  discard block
 block discarded – undo
36 36
 			if ($this->getTestInt($value) === true) {
37 37
 				$this->acces_administration = $value;
38 38
 				return true;
39
-			}
40
-			else if ($this->getTestInt($value) === false) {
39
+			} else if ($this->getTestInt($value) === false) {
41 40
 				$this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>";
42 41
 				return false;
43
-			}
44
-			else {
42
+			} else {
45 43
 				return true;
46 44
 			}
47 45
 
@@ -59,12 +57,10 @@  discard block
 block discarded – undo
59 57
 			if ($this->getTestInt($value) === true) {
60 58
 				$this->id_liste_droit_acces = $value;
61 59
 				return true;
62
-			}
63
-			else if ($this->getTestInt($value) === false) {
60
+			} else if ($this->getTestInt($value) === false) {
64 61
 				$this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>";
65 62
 				return false;
66
-			}
67
-			else {
63
+			} else {
68 64
 				return true;
69 65
 			}
70 66
 
Please login to merge, or discard this patch.
core/Cache.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 					$this->reload_cache = $obj->reload_cache;
67 67
 					$this->no_cache = $obj->no_cache;
68 68
 				}
69
-			}
70
-			else {
69
+			} else {
71 70
 				$value = [
72 71
 						"nom_fichier" => $this->page,
73 72
 						"reload_cache" => 0
@@ -108,16 +107,14 @@  discard block
 block discarded – undo
108 107
 					require_once($this->chemin_cache);
109 108
 
110 109
 					return true;
111
-				}
112
-				else {
110
+				} else {
113 111
 					if ($this->no_cache == null) {
114 112
 						ob_start();
115 113
 					}
116 114
 
117 115
 					return false;
118 116
 				}
119
-			}
120
-			else {
117
+			} else {
121 118
 				return false;
122 119
 			}
123 120
 		}
Please login to merge, or discard this patch.
core/database/Database.php 1 patch
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
 			if ($query) {
56 56
 				$obj = $query->fetchAll(PDO::FETCH_OBJ);
57 57
 				return $obj;
58
-			}
59
-			else {
58
+			} else {
60 59
 				FlashMessage::setFlash("Une erreur est survenue en executant cette requette : ".$req);
61 60
 			}
62 61
 		}
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
 		public function rechercherEgalite($table, $champ, $value, $id_table = null, $id = null) {
85 84
 			if ($id == null) {
86 85
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value'");
87
-			}
88
-			else {
86
+			} else {
89 87
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value' AND $id_table != $id");
90 88
 			}
91 89
 
@@ -94,9 +92,10 @@  discard block
 block discarded – undo
94 92
 					$nb = $obj["nb"];
95 93
 				}
96 94
 
97
-				if ((isset($nb)) && ($nb != 0)) return true;
98
-			}
99
-			else {
95
+				if ((isset($nb)) && ($nb != 0)) {
96
+					return true;
97
+				}
98
+			} else {
100 99
 				return false;
101 100
 			}
102 101
 		}
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 
114 113
 			if ($query->rowCount() > 0) {
115 114
 				return true;
116
-			}
117
-			else {
115
+			} else {
118 116
 				return false;
119 117
 			}
120 118
 		}
Please login to merge, or discard this patch.
core/database/Querybuilder.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 			if ($no_bind === true) {
110 110
 				$this->conditions_table[] = $champ.$cond.$champ_test." ".$closure;
111
-			}
112
-			else {
111
+			} else {
113 112
 				$this->conditions[] = $cond;
114 113
 				$this->addWhere($champ, $champ_test);
115 114
 			}
@@ -121,7 +120,9 @@  discard block
 block discarded – undo
121 120
 		 * @param string $order
122 121
 		 */
123 122
 		public function orderBy($order, $type = null) {
124
-			if ($type === null) $type = "ASC";
123
+			if ($type === null) {
124
+				$type = "ASC";
125
+			}
125 126
 
126 127
 			$this->order_by = " ORDER BY ".$order." ".$type." ";
127 128
 
Please login to merge, or discard this patch.
admin/controller/initialise_all.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
39 39
 			$acces_admin = $_SESSION['acces_admin'];
40 40
 
41 41
 			unset($_SESSION['err_ajout_utilisateur']);
42
-		}
43
-		else {
42
+		} else {
44 43
 			$nom = null;
45 44
 			$prenom = null;
46 45
 			$pseudo = null;
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
 			$contenu_page = $_SESSION['contenu'];
68 67
 
69 68
 			unset($_SESSION['err_modification_contenu']);
70
-		}
71
-		else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
69
+		} else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
72 70
 			$id_page_courante = $_GET['id'];
73 71
 
74 72
 			$contenu->getHeadPage($id_page_courante);
@@ -85,8 +83,7 @@  discard block
 block discarded – undo
85 83
 			if ($url == "") {
86 84
 				$url = "index";
87 85
 			}
88
-		}
89
-		else {
86
+		} else {
90 87
 			$balise_title = null;
91 88
 			$url = null;
92 89
 			$meta_description = null;
@@ -124,8 +121,7 @@  discard block
 block discarded – undo
124 121
 			$contenu_dynamique = $config->getContenusDynamique();
125 122
 			$responsive = $config->getResponsive();
126 123
 			$cache_config = $config->getCache();
127
-		}
128
-		else {
124
+		} else {
129 125
 			$config = new \core\Configuration();
130 126
 			$nom_site = $config->getNomSite();
131 127
 			$url_site = $config->getUrlSite();
@@ -161,8 +157,7 @@  discard block
 block discarded – undo
161 157
 			$db_host_prod = $_SESSION["db_host_prod"];
162 158
 
163 159
 			unset($_SESSION['err_modification_configini']);
164
-		}
165
-		else {
160
+		} else {
166 161
 			$developpement = $ini["developpment"];
167 162
 
168 163
 			$db_type_dev = $ini["dev"]["DB_TYPE"];
Please login to merge, or discard this patch.
core/admin/contenus/gestion/contenus_inline.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 	$gestion_contenu = new \core\admin\contenus\GestionContenus();
3 3
 	$droit_acces = new \core\admin\droitsacces\DroitAcces();
4 4
 
5
-	if ((($droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_POST['id_page']) == true) &&  ($droit_acces->getModifContenu() != 0)) || ($droit_acces->getSuperAdmin() == 1)) {
5
+	if ((($droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_POST['id_page']) == true) && ($droit_acces->getModifContenu() != 0)) || ($droit_acces->getSuperAdmin() == 1)) {
6 6
 
7 7
 		$gestion_contenu->setModifierContenu($_GET['id_page'], $_GET['contenu']);
8 8
 
Please login to merge, or discard this 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.
admin/views/gestion-contenus/inline.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 <button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page supprimer open-popup" popup="supprimer-page" href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Annuler</button>
20 20
 
21 21
 
22
-<?php if ($config->getResponsive() == 1){?>
22
+<?php if ($config->getResponsive() == 1) {?>
23 23
 	<link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/foundation-inline.css">
24 24
 <?php }?>
25 25
 <link rel="stylesheet" type="text/css" href="<?=TPLWEBROOT?>css/page.css">
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 <script>
36 36
 	CKEDITOR.disableAutoInline = true;
37 37
 
38
-	<?php for($i=0 ; $i<$bloc_editable ; $i++):?>
38
+	<?php for ($i = 0; $i < $bloc_editable; $i++):?>
39 39
 		var editor<?=$i?> = CKEDITOR.inline("editor<?=$i?>", { customConfig: "<?=WEBROOT?>config/config_ckeditor.js" });
40 40
 		CKFinder.setupCKEditor( editor<?=$i?>, "<?=LIBSWEBROOT?>ckfinder/" );
41
-	<?php endfor;?>
41
+	<?php endfor; ?>
42 42
 </script>
43
-<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php");?>
44 43
\ No newline at end of file
44
+<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php"); ?>
45 45
\ No newline at end of file
Please login to merge, or discard this patch.