Passed
Push — master ( 88aff4...a3226d )
by Anthony
03:07
created
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.
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/ImportModule.php 1 patch
Braces   +14 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,8 +21,12 @@  discard block
 block discarded – undo
21 21
 		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
22 22
 		public function __construct() {
23 23
 			//On test si dossier temporaire + modules a la racines existes bien sinon on les crées
24
-			if (!file_exists(ROOT."temp")) mkdir(ROOT."temp");
25
-			if (!file_exists(ROOT."modules")) mkdir(ROOT."modules");
24
+			if (!file_exists(ROOT."temp")) {
25
+				mkdir(ROOT."temp");
26
+			}
27
+			if (!file_exists(ROOT."modules")) {
28
+				mkdir(ROOT."modules");
29
+			}
26 30
 		}
27 31
 		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
28 32
 		
@@ -95,8 +99,7 @@  discard block
 block discarded – undo
95 99
 				}
96 100
 
97 101
 				FlashMessage::setFlash("Votre module a bien été ajouté au site.", "success");
98
-			}
99
-			else {
102
+			} else {
100 103
 				FlashMessage::setFlash("Le module n'a pas pu être correctement téléchargé et installé, veuillez réesseyer dans un instant");
101 104
 			}
102 105
 		}
@@ -131,8 +134,7 @@  discard block
 block discarded – undo
131 134
 
132 135
 					FlashMessage::setFlash("Votre module a bien été mis à jour", "success");
133 136
 				}
134
-			}
135
-			else {
137
+			} else {
136 138
 				FlashMessage::setFlash("Impossible de télécharger la mise à jour, veuillez réesseyer dans un instant");
137 139
 			}
138 140
 		}
@@ -144,8 +146,7 @@  discard block
 block discarded – undo
144 146
 		private function setSupprimerArchiveTemp() {
145 147
 			if (unlink(TEMPROOT.$this->nom_fichier) == true) {
146 148
 				return true;
147
-			}
148
-			else {
149
+			} else {
149 150
 				return false;
150 151
 			}
151 152
 		}
@@ -190,7 +191,11 @@  discard block
 block discarded – undo
190 191
 				$objects = scandir($url);
191 192
 				foreach ($objects as $object) {
192 193
 					if ($object != "." && $object != "..") {
193
-						if (filetype($url."/".$object) == "dir") $this->supprimerDossier($url."/".$object); else unlink($url."/".$object);
194
+						if (filetype($url."/".$object) == "dir") {
195
+							$this->supprimerDossier($url."/".$object);
196
+						} else {
197
+							unlink($url."/".$object);
198
+						}
194 199
 					}
195 200
 				}
196 201
 				reset($objects);
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/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_new/ckeditor.php');
3 3
 	require_once(ROOT.'libs/ckfinder/ckfinder.php');
4 4
 	$ckeditor = new CKEditor();
5
-	$ckeditor->basePath	= WEBROOT.'libs/ckeditor_new/';
5
+	$ckeditor->basePath = WEBROOT.'libs/ckeditor_new/';
6 6
 	CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/');
7 7
\ No newline at end of file
Please login to merge, or discard this patch.