Passed
Push — master ( 25ab92...d5a1bb )
by Anthony
03:06
created
core/Navigation.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 			$navigation = [];
13 13
 			$last_ordre = "";
14 14
 
15
-			if($no_module === null) {
15
+			if ($no_module === null) {
16 16
 				$query = $dbc->select()->from("navigation")->orderBy("ordre")->get();
17 17
 			}
18 18
 			else {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 			if (is_array($query) && (count($query) > 0)) {
76 76
 				foreach ($query as $obj) {
77
-					$sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title,];
77
+					$sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title, ];
78 78
 				}
79 79
 			}
80 80
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		public function setAjoutLien($id, $value_id) {
112 112
 			$dbc = App::getDb();
113 113
 
114
-			$dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre+1)->into("navigation")->set();
114
+			$dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre + 1)->into("navigation")->set();
115 115
 		}
116 116
 
117 117
 		public function setSupprimerLien($id, $value_id) {
Please login to merge, or discard this 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 2 patches
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.
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,6 @@
 block discarded – undo
66 66
 		}
67 67
 
68 68
 		/**
69
-		 * @param null $systeme
70
-		 * recupere la listes des modules ajouter par un autre admin
71
-		 * fonction utilisée uniquement dans la config
72 69
 		 */
73 70
 		public function getListeModule() {
74 71
 			$dbc = App::getDb();
Please login to merge, or discard this patch.
admin/views/gestion-contenus/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 						<ul>
8 8
 							<?php foreach ($nav[4] as $snav):?>
9 9
 								<li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$snav[0]?>" title="<?=$snav[3]?>"><?=$snav[1]?></a></li>
10
-							<?php endforeach;?>
10
+							<?php endforeach; ?>
11 11
 						</ul>
12
-					<?php endif;?>
12
+					<?php endif; ?>
13 13
 				</li>
14
-			<?php endforeach;?>
14
+			<?php endforeach; ?>
15 15
 		</ul>
16 16
 	</div>
17 17
 </nav>
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/mail/Mail.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
 		public function setVerifierMail($email) {
25 25
 			if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
26 26
 				return true;
27
-			}
28
-			else {
27
+			} else {
29 28
 				return false;
30 29
 			}
31 30
 		}
@@ -42,7 +41,9 @@  discard block
 block discarded – undo
42 41
 			//on récupere le mail du site
43 42
 			$config = new \core\Configuration();
44 43
 
45
-			if ($from == null) $from = $config->getMailSite();
44
+			if ($from == null) {
45
+				$from = $config->getMailSite();
46
+			}
46 47
 
47 48
 			$headers = 'Content-type: text/html; charset=utf-8'."\r\n";
48 49
 			$headers .= "From: ".$from;
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
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 		<button type="submit" class="submit-contenu" type="submit"><i class="fa fa-check"></i>Valider</button>
17 17
 	<?php endif; ?>
18 18
 	<input type="hidden" name="id_page" value="<?=$id_page_courante?>">
19
-	<?php if (($_GET['id'] != 1) && (($droit_acces->getSupprimerPage() == 1)  || ($droit_acces->getSuperAdmin() == 1))):?>
19
+	<?php if (($_GET['id'] != 1) && (($droit_acces->getSupprimerPage() == 1) || ($droit_acces->getSuperAdmin() == 1))):?>
20 20
 		<button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page supprimer open-popup" popup="supprimer-page" href="<?=ADMWEBROOT?>controller/core/admin/contenus/gestion/supprimer_page?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Supprimer cette page</button>
21 21
 	<?php endif; ?>
22 22
 
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/modules/CheckVersionModule.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 		}
112 112
 
113 113
 		/**
114
-		 * @param $version_txt
114
+		 * @param string $version_txt
115 115
 		 * @param $version
116 116
 		 * @param $id_module
117 117
 		 * fonction qui va vérifier si notre mdule est bien a jour
Please login to merge, or discard this patch.