Passed
Push — master ( f1cdd9...404c89 )
by Anthony
02:41
created
core/admin/navigation/AdminNavigation.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
 	use core\HTML\flashmessage\FlashMessage;
6 6
 	use core\Navigation;
7 7
 
8
-	class AdminNavigation extends Navigation{
8
+	class AdminNavigation extends Navigation {
9 9
 
10 10
 		public function setOrdreNavigation($nav) {
11 11
 			$dbc = App::getDb();
12 12
 			$count_nav = count($nav);
13 13
 
14
-			for ($i=0 ; $i<$count_nav ; $i++) {
14
+			for ($i = 0; $i < $count_nav; $i++) {
15 15
 				$lien = explode(".", $nav[$i]);
16 16
 
17 17
 				if ($lien[1] == "page") {
18
-					$dbc->update("ordre", $i+1)->from("navigation")->where("ID_page", "=", $lien[0])->set();
18
+					$dbc->update("ordre", $i + 1)->from("navigation")->where("ID_page", "=", $lien[0])->set();
19 19
 				}
20 20
 				else {
21
-					$dbc->update("ordre", $i+1)->from("navigation")->where("ID_module", "=", $lien[0])->set();
21
+					$dbc->update("ordre", $i + 1)->from("navigation")->where("ID_module", "=", $lien[0])->set();
22 22
 				}
23 23
 			}
24 24
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 	use core\HTML\flashmessage\FlashMessage;
6 6
 	use core\Navigation;
7 7
 
8
-	class AdminNavigation extends Navigation{
8
+	class AdminNavigation extends Navigation {
9 9
 
10 10
 		public function setOrdreNavigation($nav) {
11 11
 			$dbc = App::getDb();
Please login to merge, or discard this patch.
core/HTML/flashmessage/FlashMessage.php 1 patch
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.
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.
installation/controller/InstallRibs.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 	namespace installation\controller;
3
-	use core\functions\ChaineCaractere;
4 3
 	use core\HTML\flashmessage\FlashMessage;
5 4
 	use core\iniparser\IniParser;
6 5
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 				$this->dbc = new \PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass);
29 29
 
30 30
 				$this->setinstallbdd();
31
-			}
32
-			catch (\PDOException $e) {
31
+			} catch (\PDOException $e) {
33 32
 				//on tente de créer la bdd
34 33
 				$erreur = "getErreur".$e->getCode();
35 34
 				$this->$erreur();
Please login to merge, or discard this patch.
admin/controller/ckeditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 	include_once(ROOT.'libs/ckeditor/ckeditor.php');
3 3
 	require_once(ROOT.'libs/ckfinder/ckfinder.php');
4 4
 	$ckeditor = new CKEditor();
5
-	$ckeditor->basePath	= WEBROOT.'libs/ckeditor/';
5
+	$ckeditor->basePath = WEBROOT.'libs/ckeditor/';
6 6
 	CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/');
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
core/Configuration.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 			return $this->cache;
71 71
 		}
72 72
 		public function getDesactiverNavigation(){
73
-		    return $this->desactiver_navigation;
73
+			return $this->desactiver_navigation;
74 74
 		}
75 75
 
76 76
 		//pour la configuration des comptes
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 		public function getCache() {
70 70
 			return $this->cache;
71 71
 		}
72
-		public function getDesactiverNavigation(){
72
+		public function getDesactiverNavigation() {
73 73
 		    return $this->desactiver_navigation;
74 74
 		}
75 75
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 		public function getCache() {
54 54
 			return $this->cache;
55 55
 		}
56
-		public function getDesactiverNavigation(){
56
+		public function getDesactiverNavigation() {
57 57
 		    return $this->desactiver_navigation;
58 58
 		}
59 59
 
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/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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 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() {
Please login to merge, or discard this patch.
admin/views/template/principal.php 2 patches
Spacing   +3 added lines, -3 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>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,9 @@
 block discarded – undo
91 91
 				</div>
92 92
 				
93 93
 				<?php
94
-					if (!isset($arr)) $arr = [];
94
+					if (!isset($arr)) {
95
+						$arr = [];
96
+					}
95 97
 					//echo $twig->render("template/left-navigation.html", array_merge(array_merge(array_merge(array_merge($arr, $constant), $_REQUEST), $_SESSION), $arr_admin));
96 98
 				?>
97 99
 				
Please login to merge, or discard this patch.