Passed
Push — master ( d47a8b...3f1f77 )
by Anthony
02:59
created
core/admin/droitsacces/DroitAcces.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,9 @@  discard block
 block discarded – undo
80 80
 				->get();
81 81
 
82 82
 			if ((is_array($query)) && (count($query) > 0)) {
83
-				foreach ($query as $obj) $liste_droit_acces[] = $obj->droit_acces;
83
+				foreach ($query as $obj) {
84
+					$liste_droit_acces[] = $obj->droit_acces;
85
+				}
84 86
 			}
85 87
 
86 88
 			return $liste_droit_acces;
@@ -131,8 +133,7 @@  discard block
 block discarded – undo
131 133
 			//si les trois sont différent de 0 on renvoit true soinon false
132 134
 			if (($this->super_admin == 1) || ((in_array($droit, $liste_droit_acces)) && in_array(1, $array_modif))) {
133 135
 				return true;
134
-			}
135
-			else {
136
+			} else {
136 137
 				return false;
137 138
 			}
138 139
 		}
@@ -147,8 +148,7 @@  discard block
 block discarded – undo
147 148
 
148 149
 			if (($this->super_admin == 1) || (in_array($droit_acces, $liste_droit_acces))) {
149 150
 				return true;
150
-			}
151
-			else {
151
+			} else {
152 152
 				return false;
153 153
 			}
154 154
 		}
Please login to merge, or discard this patch.
admin/views/template/principal.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 		<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
8 8
 		<link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/style.css">
9 9
 		<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
10
-		<?php require_once(ROOT."admin/views/template/js/menu.php");?>
10
+		<?php require_once(ROOT."admin/views/template/js/menu.php"); ?>
11 11
 
12 12
 		<!-- Les librairies utlisées -->
13 13
 		<link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>popup/css/style.css">
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	</head>
18 18
 	<?=\core\HTML\flashmessage\FlashMessage::getFlash(); ?>
19 19
 	<body>
20
-		<nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif;?>">
20
+		<nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif; ?>">
21 21
 			<div class="titre">
22 22
 				<h1>Ribs V0.1</h1>
23 23
 				<i class="fa fa-bars"></i>
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 										<a href="<?=ADMWEBROOT?>notifications"><i class="fa fa-bell  <?php if ($admin->getNotification() == 1):?> animated infinite swing<?php endif; ?>"></i></a>
40 40
 									</div>
41 41
 								</div>
42
-							<?php endif;?>
42
+							<?php endif; ?>
43 43
 							<div class="colonne">
44 44
 								<div class="config">
45 45
 									<a href="<?=ADMWEBROOT?>configuration/index"><i class="fa fa-gear"></i></a>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 							<ul>
64 64
 								<?php if ($droit_acces->getDroitAcces("CREATION COMPTE ADMIN")):?>
65 65
 									<li><i class="fa fa-user"></i><a href="<?=ADMWEBROOT?>gestion-comptes/creer-utilisateur">Créer un utilisateur</a></li>
66
-								<?php endif;?>
66
+								<?php endif; ?>
67 67
 							</ul>
68 68
 						</li>
69 69
 					<?php endif; ?>
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,10 +110,11 @@
 block discarded – undo
110 110
 
111 111
 		<?php
112 112
 			if ($twig_page === true) {
113
-				if (!isset($arr)) $arr = [];
113
+				if (!isset($arr)) {
114
+					$arr = [];
115
+				}
114 116
 				echo $twig->render($page.".html", array_merge(array_merge(array_merge(array_merge($arr, $constant), $_REQUEST), $_SESSION), $arr_admin));
115
-			}
116
-			else {
117
+			} else {
117 118
 				require("admin/views/".$page.".php");
118 119
 			}
119 120
 		?>
Please login to merge, or discard this patch.
admin/views/gestion-contenus/inline.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@
 block discarded – undo
31 31
 <script>
32 32
 	CKEDITOR.disableAutoInline = true;
33 33
 
34
-	<?php for($i=0 ; $i<$bloc_editable ; $i++):?>
34
+	<?php for ($i = 0; $i < $bloc_editable; $i++):?>
35 35
 		$(document).ready(function() {
36 36
 			console.log("editor<?=$i?>");
37 37
 			$("#editor<?=$i?>").attr("contenteditable", true);
38 38
 		})
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.
core/admin/Admin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 			if (($config->getValiderInscription() == 1) && ($valide == 0)) {
86 86
 				return "<a href=".ADMWEBROOT."controller/core/admin/comptes/valider_compte?id_identite=$id_identite>Valider cet utilisateur</a>";
87
-			}
88
-			else {
87
+			} else {
89 88
 				return "Utilisateur validé";
90 89
 			}
91 90
 		}
@@ -180,8 +179,7 @@  discard block
 block discarded – undo
180 179
 
181 180
 				$mail = new Mail();
182 181
 				$mail->setEnvoyerMail("Réinitialisation de votre E-mail effectuée", "Votre mot de passe a été réinitialisé", $this->mail);
183
-			}
184
-			else {
182
+			} else {
185 183
 				FlashMessage::setFlash("le mot de passe de $this->pseudo ne peu pas être réinitialisé car il ne possède pas d'E-mail");
186 184
 				$this->erreur = "le mot de passe de $this->pseudo ne peu pas être réinitialisé car il ne possède pas d'E-mail";
187 185
 			}
Please login to merge, or discard this patch.
core/modules/RouterModule.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 		public function getPage() {
24 24
 			return $this->page;
25 25
 		}
26
-		public function getModule(){
26
+		public function getModule() {
27 27
 			return $this->module;
28 28
 		}
29 29
 		public function getController() {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		 * Permets de générer l'url pour aller charger la page concernee pour le module blog
56 56
 		 * appele également l'actoin à effectur dans la page
57 57
 		 */
58
-		public function getUrl($url, $admin="app") {
58
+		public function getUrl($url, $admin = "app") {
59 59
 			$explode = explode("/", $url);
60 60
 			$count = count($explode);
61 61
 			$debut_url = "";
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
 				if (in_array($explode[$i], $this->getAllModules())) {
66 66
 					$this->module = $explode[$i];
67 67
 					$debut_url = $explode[$i];
68
-				}
69
-				else if ($i >= 1) {
68
+				} else if ($i >= 1) {
70 69
 					$centre_url[] = $explode[$i];
71 70
 				}
72 71
 			}
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
 			
77 76
 			if ($centre_url == "") {
78 77
 				$this->page = "index";
79
-			}
80
-			else {
78
+			} else {
81 79
 				$file = ROOT."modules/".$debut_url."/".$admin."/views/".$centre_url;
82 80
 				
83 81
 				if (!file_exists($file.".html")) {
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
 			//on require le fichier routes.php dans /modules/nom_module/router/routes.php
130 128
 			if ($this->admin !== "app") {
131 129
 				require_once(MODULEROOT.$this->module."/router/admin_routes.php");
132
-			}
133
-			else {
130
+			} else {
134 131
 				require_once(MODULEROOT.$this->module."/router/routes.php");
135 132
 			}
136 133
 		}
Please login to merge, or discard this patch.
admin/views/gestion-contenus/modifier-contenu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 						<label class="label label-textarea" for="meta_description" data-error="La description doit être comprise entre 10 et 158 caractères">Description de votre site pour le navigateur (maximum 256 caractères)</label>
51 51
 						<textarea name="meta_description" type-val="string" min="10" max="158" required=""><?=$meta_description?></textarea>
52 52
 					</div>
53
-				<?php endif;?>
53
+				<?php endif; ?>
54 54
 			</section>
55 55
 		<?php endif; ?>
56 56
 
Please login to merge, or discard this patch.
config/initialise.php 1 patch
Braces   +4 added lines, -3 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,8 +48,7 @@  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
 	
Please login to merge, or discard this patch.
admin/controller/initialise_all.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
 			$acces_admin = $_SESSION['acces_admin'];
37 37
 
38 38
 			unset($_SESSION['err_ajout_utilisateur']);
39
-		}
40
-		else {
39
+		} else {
41 40
 			$nom = null;
42 41
 			$prenom = null;
43 42
 			$pseudo = null;
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
 			$parent_courant = $_SESSION['parent'];
64 63
 
65 64
 			unset($_SESSION['err_modification_contenu']);
66
-		}
67
-		else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
65
+		} else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
68 66
 			$id_page_courante = $_GET['id'];
69 67
 
70 68
 			$contenu->getHeadPage($id_page_courante);
@@ -79,8 +77,7 @@  discard block
 block discarded – undo
79 77
 			$contenu_page = $contenu->getContenu();
80 78
 			$bloc_editable = $gestion_contenu->getBlocEditable($id_page_courante);
81 79
 			$redirect_page = $gestion_contenu->getTestRedirectPage($url);
82
-		}
83
-		else {
80
+		} else {
84 81
 			$balise_title = null;
85 82
 			$url = null;
86 83
 			$meta_description = null;
@@ -112,8 +109,7 @@  discard block
 block discarded – undo
112 109
 			$db_host_dev = $_SESSION["db_host_dev"];
113 110
 
114 111
 			unset($_SESSION['err_modification_configini']);
115
-		}
116
-		else {
112
+		} else {
117 113
 			\core\App::setValues(["bdd" => $ini]);
118 114
 		}
119 115
 	}
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
 		}
@@ -33,8 +32,7 @@  discard block
 block discarded – undo
33 32
 		public function setModifierConfigIni($developpement, $dev_info) {
34 33
 			if ($developpement == "on") {
35 34
 				$developpement = 1;
36
-			}
37
-			else {
35
+			} else {
38 36
 				$developpement = 0;
39 37
 			}
40 38
 
Please login to merge, or discard this patch.