Passed
Push — master ( 2488a8...c9802b )
by Anthony
03:12
created
core/images/Images.class.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@
 block discarded – undo
43 43
 		//-------------------------- GETTER ----------------------------------------------------------------------------//
44 44
 
45 45
 		public function getOldImage() {
46
-		    return $this->old_image;
46
+			return $this->old_image;
47 47
 		}
48 48
 		public function getCheminImage() {
49
-		    return $this->chemin_image;
49
+			return $this->chemin_image;
50 50
 		}
51 51
 		public function getErreur() {
52
-		    return $this->erreur;
52
+			return $this->erreur;
53 53
 		}
54 54
 		public function getNomImage() {
55 55
 			return $this->nom_image;
Please login to merge, or discard this patch.
core/images/Resize.class.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 		{
22 22
 			// *** Class variables
23 23
 			private $image;
24
-		    private $width;
25
-		    private $height;
24
+			private $width;
25
+			private $height;
26 26
 			private $imageResized;
27 27
 
28 28
 			function __construct($fileName)
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 				// *** Open up the file
31 31
 				$this->image = $this->openImage($fileName);
32 32
 
33
-			    // *** Get width and height
34
-			    $this->width  = imagesx($this->image);
35
-			    $this->height = imagesy($this->image);
33
+				// *** Get width and height
34
+				$this->width  = imagesx($this->image);
35
+				$this->height = imagesy($this->image);
36 36
 			}
37 37
 
38 38
 			## --------------------------------------------------------
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
 			public function saveImage($savePath, $imageQuality="100")
207 207
 			{
208 208
 				// *** Get extension
209
-        		$extension = strrchr($savePath, '.');
210
-       			$extension = strtolower($extension);
209
+				$extension = strrchr($savePath, '.');
210
+	   			$extension = strtolower($extension);
211 211
 
212 212
 				switch($extension)
213 213
 				{
Please login to merge, or discard this patch.
core/admin/droitsacces/GestionDroitAcces.class.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-    namespace core\admin\droitsacces;
2
+	namespace core\admin\droitsacces;
3 3
 
4
-    use core\App;
4
+	use core\App;
5 5
 
6 6
 	class GestionDroitAcces extends DroitAcces {
7 7
 		//pour les droit_acces standard
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 
26 26
 
27
-        //-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
27
+		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
28 28
 		public function __construct($id_liste_droit_acces=null) {
29 29
 			$dbc = App::getDb();
30 30
 
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 				$this->id_liste_droit_acces = $id_liste_droit_acces;
65 65
 			}
66 66
 		}
67
-        //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
67
+		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
68 68
 
69 69
 
70 70
 
71
-        //-------------------------- GETTER ----------------------------------------------------------------------------//
71
+		//-------------------------- GETTER ----------------------------------------------------------------------------//
72 72
 		//pour les droit_acces standard
73 73
 		public function getIdListeDroitAcces() {
74 74
 			return $this->id_liste_droit_acces;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 			return $this->pseudo;
109 109
 		}
110 110
 		public function getNbUser(){
111
-		    return $this->nb_user;
111
+			return $this->nb_user;
112 112
 		}
113 113
 
114 114
 		/**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		 * @param $id_liste_droit_acces
117 117
 		 */
118 118
 		public function getListeDroitAccesDetailDroit($id_liste_droit_acces=null){
119
-		    $dbc = \core\App::getDb();
119
+			$dbc = \core\App::getDb();
120 120
 
121 121
 			if ($id_liste_droit_acces == null) $id_liste_droit_acces = $this->id_liste_droit_acces;
122 122
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		 * @param $id_liste_droit_acces
161 161
 		 */
162 162
 		public function getListeDroitAccesDetailPage($id_liste_droit_acces=null){
163
-		    $dbc = \core\App::getDb();
163
+			$dbc = \core\App::getDb();
164 164
 
165 165
 			if ($id_liste_droit_acces == null) $id_liste_droit_acces = $this->id_liste_droit_acces;
166 166
 
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
 				$this->setListeDroitAccesDetailPage($id_page, $titre_page);
180 180
 			}
181 181
 		}
182
-        //-------------------------- FIN GETTER ----------------------------------------------------------------------------//
182
+		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
183 183
 
184 184
 
185 185
 
186
-        //-------------------------- SETTER ----------------------------------------------------------------------------//
186
+		//-------------------------- SETTER ----------------------------------------------------------------------------//
187 187
 		private function setListeDroitAcces($id_liste_droit_acces, $nom_liste, $nb_droit_acces, $nb_droit_acces_page, $nb_user){
188 188
 			$this->id_liste_droit_acces = $id_liste_droit_acces;
189 189
 			$this->nom_liste = $nom_liste;
@@ -205,4 +205,4 @@  discard block
 block discarded – undo
205 205
 			$this->prenom = $prenom;
206 206
 		}
207 207
 		//-------------------------- FIN SETTER ----------------------------------------------------------------------------//
208
-    }
209 208
\ No newline at end of file
209
+	}
210 210
\ No newline at end of file
Please login to merge, or discard this patch.
core/admin/droitsacces/DroitAcces.class.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-    namespace core\admin\droitsacces;
2
+	namespace core\admin\droitsacces;
3 3
 
4 4
 	use core\App;
5 5
 
6 6
 	class DroitAcces {
7
-    	private $logged;
7
+		private $logged;
8 8
 
9 9
 		//pour la table identite
10 10
 		private $id_identite;
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 
22 22
 
23 23
 		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
24
-        public function __construct() {
24
+		public function __construct() {
25 25
 			$dbc = \core\App::getDb();
26 26
 
27
-            if (isset($_SESSION["idlogin".CLEF_SITE])) {
27
+			if (isset($_SESSION["idlogin".CLEF_SITE])) {
28 28
 				$this->logged = true;
29 29
 				$this->id_identite = $_SESSION["idlogin".CLEF_SITE];
30 30
 
@@ -44,36 +44,36 @@  discard block
 block discarded – undo
44 44
 			else {
45 45
 				$this->logged = false;
46 46
 			}
47
-        }
48
-        //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
47
+		}
48
+		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
49 49
     
50 50
     
51 51
     
52
-        //-------------------------- GETTER ----------------------------------------------------------------------------//
52
+		//-------------------------- GETTER ----------------------------------------------------------------------------//
53 53
 		public function getLogged(){
54
-		    return $this->logged;
54
+			return $this->logged;
55 55
 		}
56 56
 		public function getSuperAdmin(){
57
-		    return $this->super_admin;
57
+			return $this->super_admin;
58 58
 		}
59 59
 
60 60
 		//pour la table liste_droit_acces
61 61
 		public function getIdListeDroitAcces(){
62
-		    return $this->id_liste_droit_acces;
62
+			return $this->id_liste_droit_acces;
63 63
 		}
64 64
 
65 65
 		//pour les droits sur la gestion des contenus
66 66
 		public function getModifSeo(){
67
-		    return $this->modif_seo;
67
+			return $this->modif_seo;
68 68
 		}
69 69
 		public function getModifContenu(){
70
-		    return $this->modif_contenu;
70
+			return $this->modif_contenu;
71 71
 		}
72 72
 		public function getModifNavigation(){
73
-		    return $this->modif_navigation;
73
+			return $this->modif_navigation;
74 74
 		}
75 75
 		public function getSupprimerPage(){
76
-		    return $this->supprimer_page;
76
+			return $this->supprimer_page;
77 77
 		}
78 78
 
79 79
 		//autres getter
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
 				return true;
241 241
 			}
242 242
 		}
243
-        //-------------------------- FIN GETTER ----------------------------------------------------------------------------//
243
+		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
244 244
     
245 245
     
246 246
     
247
-        //-------------------------- SETTER ----------------------------------------------------------------------------//
247
+		//-------------------------- SETTER ----------------------------------------------------------------------------//
248 248
 
249
-        //-------------------------- FIN SETTER ----------------------------------------------------------------------------//
250
-    }
251 249
\ No newline at end of file
250
+		//-------------------------- FIN SETTER ----------------------------------------------------------------------------//
251
+	}
252 252
\ No newline at end of file
Please login to merge, or discard this patch.
core/App.class.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2
-    namespace core;
2
+	namespace core;
3 3
 
4
-    class App {
5
-    	private static $database;
4
+	class App {
5
+		private static $database;
6 6
 		private static $erreur;
7 7
     
8 8
     
9
-        //-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
-        public function __construct() {
9
+		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
+		public function __construct() {
11 11
             
12
-        }
13
-        //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
12
+		}
13
+		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
14 14
     
15 15
     
16 16
     
17
-        //-------------------------- GETTER ----------------------------------------------------------------------------//
17
+		//-------------------------- GETTER ----------------------------------------------------------------------------//
18 18
 		public static function getErreur(){
19
-		    return self::$erreur;
19
+			return self::$erreur;
20 20
 		}
21 21
 
22 22
 		/**
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 				return "<li>$err_egalite</li>";
55 55
 			}
56 56
 		}
57
-        //-------------------------- FIN GETTER ----------------------------------------------------------------------------//
57
+		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
58 58
     
59 59
     
60 60
     
61
-        //-------------------------- SETTER ----------------------------------------------------------------------------//
62
-        //-------------------------- FIN SETTER ----------------------------------------------------------------------------//
63
-    }
64 61
\ No newline at end of file
62
+		//-------------------------- SETTER ----------------------------------------------------------------------------//
63
+		//-------------------------- FIN SETTER ----------------------------------------------------------------------------//
64
+	}
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
core/mail/Mail.class.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -1,69 +1,69 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-    namespace core\mail;
3
+	namespace core\mail;
4 4
         
5
-    class Mail {
6
-        private $mail;
5
+	class Mail {
6
+		private $mail;
7 7
     
8 8
     
9
-        //-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
-        public function __construct($mail = null) {
11
-            $this->mail = $mail;
12
-        }
13
-        //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
9
+		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
+		public function __construct($mail = null) {
11
+			$this->mail = $mail;
12
+		}
13
+		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
14 14
     
15 15
     
16 16
     
17
-        //-------------------------- GETTER ----------------------------------------------------------------------------//
18
-        //-------------------------- FIN GETTER ----------------------------------------------------------------------------//
17
+		//-------------------------- GETTER ----------------------------------------------------------------------------//
18
+		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
19 19
 
20 20
 
21 21
     
22
-        //-------------------------- SETTER ----------------------------------------------------------------------------//
23
-        /**
24
-         * fonction qui permet de valider si un E-mail est valide
25
-         * @return bool
26
-         */
27
-        public function setVerifierMail() {
28
-            if (filter_var($this->mail, FILTER_VALIDATE_EMAIL)) {
29
-                return true;
30
-            }
31
-            else {
32
-                return false;
33
-            }
34
-        }
22
+		//-------------------------- SETTER ----------------------------------------------------------------------------//
23
+		/**
24
+		 * fonction qui permet de valider si un E-mail est valide
25
+		 * @return bool
26
+		 */
27
+		public function setVerifierMail() {
28
+			if (filter_var($this->mail, FILTER_VALIDATE_EMAIL)) {
29
+				return true;
30
+			}
31
+			else {
32
+				return false;
33
+			}
34
+		}
35 35
 
36
-        /**
37
-         * fonction qui permet d'envoyer un mail
38
-         * @param $sujet
39
-         * @param $message
40
-         * @param null $destinataire -> si  null on envoi un mail au gerant du site
41
-         * @param null $destinataire -> si  null on emet le gerant du site car mail vient depuis l'admin
42
-         * @return bool
43
-         */
44
-        public function setEnvoyerMail($sujet, $message, $destinataire = null, $from = null) {
45
-            //on récupere le mail du site
46
-            $config = new \core\Configuration();
36
+		/**
37
+		 * fonction qui permet d'envoyer un mail
38
+		 * @param $sujet
39
+		 * @param $message
40
+		 * @param null $destinataire -> si  null on envoi un mail au gerant du site
41
+		 * @param null $destinataire -> si  null on emet le gerant du site car mail vient depuis l'admin
42
+		 * @return bool
43
+		 */
44
+		public function setEnvoyerMail($sujet, $message, $destinataire = null, $from = null) {
45
+			//on récupere le mail du site
46
+			$config = new \core\Configuration();
47 47
 
48
-            if ($from == null) $from = $config->getMailSite();
48
+			if ($from == null) $from = $config->getMailSite();
49 49
 
50
-            $headers = 'Content-type: text/html; charset=utf-8'."\r\n";
51
-            $headers .= "From: ".$from;
50
+			$headers = 'Content-type: text/html; charset=utf-8'."\r\n";
51
+			$headers .= "From: ".$from;
52 52
 
53
-            //si pas de destinataire on envoi le mail au gérant du site car c'est un mail envoyé par le site lui même
54
-            if (($destinataire == null) && ($this->mail == null)) {
55
-                $destinataire = $config->getMailSite();
56
-            }
57
-            else if ($destinataire == null) {
58
-                $destinataire = $this->mail;
59
-            }
53
+			//si pas de destinataire on envoi le mail au gérant du site car c'est un mail envoyé par le site lui même
54
+			if (($destinataire == null) && ($this->mail == null)) {
55
+				$destinataire = $config->getMailSite();
56
+			}
57
+			else if ($destinataire == null) {
58
+				$destinataire = $this->mail;
59
+			}
60 60
 
61
-            if (mail($destinataire, $sujet, $message, $headers)) {
62
-                return true;
63
-            }
64
-            else {
65
-                return false;
66
-            }
67
-        }
68
-        //-------------------------- FIN SETTER ----------------------------------------------------------------------------//
69
-    }
70 61
\ No newline at end of file
62
+			if (mail($destinataire, $sujet, $message, $headers)) {
63
+				return true;
64
+			}
65
+			else {
66
+				return false;
67
+			}
68
+		}
69
+		//-------------------------- FIN SETTER ----------------------------------------------------------------------------//
70
+	}
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
core/form/FormValidator.class.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 <?php
2
-    namespace core\form;
2
+	namespace core\form;
3 3
 
4
-    class FormValidator {
5
-        private $datas = [];
6
-        private $errors = [];
4
+	class FormValidator {
5
+		private $datas = [];
6
+		private $errors = [];
7 7
 
8 8
 
9
-        //-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
-        public function __construct($datas) {
11
-            $this->datas = $datas;
12
-        }
13
-        //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
9
+		//-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------//
10
+		public function __construct($datas) {
11
+			$this->datas = $datas;
12
+		}
13
+		//-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------//
14 14
 
15 15
 
16
-        //-------------------------- GETTER ----------------------------------------------------------------------------//
17
-        public function Check($name, $rule, $option = null) {
18
-            $validator = "validate".ucfirst($rule);
16
+		//-------------------------- GETTER ----------------------------------------------------------------------------//
17
+		public function Check($name, $rule, $option = null) {
18
+			$validator = "validate".ucfirst($rule);
19 19
 
20
-            if (!$this->$validator($name, $option)) {
21
-                $this->errors[$name] = "Le champ $name n'a pas été rempli correctement";
22
-            }
23
-        }
20
+			if (!$this->$validator($name, $option)) {
21
+				$this->errors[$name] = "Le champ $name n'a pas été rempli correctement";
22
+			}
23
+		}
24 24
 
25
-        public function getErrors() {
26
-            if (!empty($this->errors)) {
27
-                $errors = "<ul>";
28
-                foreach ($this->errors as $error) {
29
-                    $errors .= "<li>".$error."</li>";
30
-                }
31
-                $errors .= "</ul>";
25
+		public function getErrors() {
26
+			if (!empty($this->errors)) {
27
+				$errors = "<ul>";
28
+				foreach ($this->errors as $error) {
29
+					$errors .= "<li>".$error."</li>";
30
+				}
31
+				$errors .= "</ul>";
32 32
 
33
-                return $errors;
34
-            }
35
-        }
36
-        //-------------------------- FIN GETTER ----------------------------------------------------------------------------//
33
+				return $errors;
34
+			}
35
+		}
36
+		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
37 37
 
38 38
 
39
-        //-------------------------- SETTER ----------------------------------------------------------------------------//
40
-        public function validateRequired($name) {
41
-            return array_key_exists($name, $this->datas) && $this->datas[$name] != "";
42
-        }
39
+		//-------------------------- SETTER ----------------------------------------------------------------------------//
40
+		public function validateRequired($name) {
41
+			return array_key_exists($name, $this->datas) && $this->datas[$name] != "";
42
+		}
43 43
 
44
-        public function validateEmail($name) {
45
-            return array_key_exists($name, $this->datas) && filter_var($this->datas[$name], FILTER_VALIDATE_EMAIL);
46
-        }
47
-        //-------------------------- FIN SETTER ----------------------------------------------------------------------------//
48
-    }
49 44
\ No newline at end of file
45
+		public function validateEmail($name) {
46
+			return array_key_exists($name, $this->datas) && filter_var($this->datas[$name], FILTER_VALIDATE_EMAIL);
47
+		}
48
+		//-------------------------- FIN SETTER ----------------------------------------------------------------------------//
49
+	}
50 50
\ No newline at end of file
Please login to merge, or discard this patch.