Passed
Branch master (ef3387)
by Anthony
09:36
created
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.
core/admin/inscription/AdminInscription.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,12 +35,10 @@  discard block
 block discarded – undo
35 35
 			if ($this->getTestInt($value) === true) {
36 36
 				$this->acces_administration = $value;
37 37
 				return true;
38
-			}
39
-			else if ($this->getTestInt($value) === false) {
38
+			} else if ($this->getTestInt($value) === false) {
40 39
 				$this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>";
41 40
 				return false;
42
-			}
43
-			else {
41
+			} else {
44 42
 				return true;
45 43
 			}
46 44
 
@@ -57,12 +55,10 @@  discard block
 block discarded – undo
57 55
 			if ($this->getTestInt($value) === true) {
58 56
 				$this->id_liste_droit_acces = $value;
59 57
 				return true;
60
-			}
61
-			else if ($this->getTestInt($value) === false) {
58
+			} else if ($this->getTestInt($value) === false) {
62 59
 				$this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>";
63 60
 				return false;
64
-			}
65
-			else {
61
+			} else {
66 62
 				return true;
67 63
 			}
68 64
 
Please login to merge, or discard this patch.
core/admin/comptes/creer_utilisateur.php 1 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
 
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.
core/App.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,11 @@  discard block
 block discarded – undo
55 55
 				$objects = scandir($url);
56 56
 				foreach ($objects as $object) {
57 57
 					if ($object != "." && $object != "..") {
58
-						if (filetype($url."/".$object) == "dir") App::supprimerDossier($url."/".$object); else unlink($url."/".$object);
58
+						if (filetype($url."/".$object) == "dir") {
59
+							App::supprimerDossier($url."/".$object);
60
+						} else {
61
+							unlink($url."/".$object);
62
+						}
59 63
 					}
60 64
 				}
61 65
 				reset($objects);
@@ -84,8 +88,7 @@  discard block
 block discarded – undo
84 88
 					'secure' => SMTP_SECURE,
85 89
 					'port' => SMTP_PORT
86 90
 				]);
87
-			}
88
-			else {
91
+			} else {
89 92
 				$mailer = new \Nette\Mail\SmtpMailer();
90 93
 			}
91 94
 
Please login to merge, or discard this patch.
core/save/save.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	date_default_timezone_set('Europe/Berlin');
3 3
 
4
-	if (!file_exists(ROOT."bdd_backup")) mkdir(ROOT."bdd_backup");
4
+	if (!file_exists(ROOT."bdd_backup")) {
5
+		mkdir(ROOT."bdd_backup");
6
+	}
5 7
 
6 8
 
7 9
 	if ($config->getLastSave() != date("Y-m-d")) {
@@ -11,8 +13,7 @@  discard block
 block discarded – undo
11 13
 			$dump->start("bdd_backup/save-".date("Y-m-d").".sql");
12 14
 
13 15
 			$config->setDateSaveToday();
14
-		}
15
-		catch (Exception $e) {
16
+		} catch (Exception $e) {
16 17
 			echo("impossible de faire une save ".$e->getMessage());
17 18
 		}
18 19
 	}
19 20
\ No newline at end of file
Please login to merge, or discard this patch.
core/form/support/envoyer_message.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 
8 8
 	if ($validator->getErrors() !== null) {
9 9
 		\core\HTML\flashmessage\FlashMessage::setFlash($validator->getErrors());
10
-	}
11
-	else {
10
+	} else {
12 11
 		$type = $_POST["type"];
13 12
 		$objet = $_POST['objet']." de la part de ".$_SERVER['HTTP_HOST'];
14 13
 		$demande = $_POST['demande'];
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
 			}
@@ -122,7 +121,9 @@  discard block
 block discarded – undo
122 121
 		 * @param string $type
123 122
 		 */
124 123
 		public function orderBy($order, $type = null) {
125
-			if ($type === null) $type = "ASC";
124
+			if ($type === null) {
125
+				$type = "ASC";
126
+			}
126 127
 
127 128
 			$this->order_by = " ORDER BY ".$order." ".$type." ";
128 129
 
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
 		}
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 		public function rechercherEgalite($table, $champ, $value, $id_table = null, $id = null) {
87 86
 			if ($id == null) {
88 87
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value'");
89
-			}
90
-			else {
88
+			} else {
91 89
 				$query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value' AND $id_table != $id");
92 90
 			}
93 91
 
@@ -96,9 +94,10 @@  discard block
 block discarded – undo
96 94
 					$nb = $obj["nb"];
97 95
 				}
98 96
 
99
-				if ((isset($nb)) && ($nb != 0)) return true;
100
-			}
101
-			else {
97
+				if ((isset($nb)) && ($nb != 0)) {
98
+					return true;
99
+				}
100
+			} else {
102 101
 				return false;
103 102
 			}
104 103
 		}
@@ -115,8 +114,7 @@  discard block
 block discarded – undo
115 114
 
116 115
 			if ($query->rowCount() > 0) {
117 116
 				return true;
118
-			}
119
-			else {
117
+			} else {
120 118
 				return false;
121 119
 			}
122 120
 		}
Please login to merge, or discard this patch.
core/auth/Encrypt.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 						$params = $obj->mdp_params;
29 29
 					}
30 30
 				}
31
-			}
32
-			else {
31
+			} else {
33 32
 				$params = self::$params;
34 33
 			}
35 34
 
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
 
82 81
 			if ($id_identite != null) {
83 82
 				self::setSaveParams("$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20), $id_identite);
84
-			}
85
-			else {
83
+			} else {
86 84
 				self::$params = "$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20);
87 85
 			}
88 86
 
Please login to merge, or discard this patch.