Code Duplication    Length = 3-5 lines in 5 locations

core/auth/Connexion.php 1 location

@@ 179-181 (lines=3) @@
176
		public static function getlastConnexion($id_identite) {
177
			$dbc = App::getDb();
178
			$query = $dbc->select("last_change_mdp")->from("identite")->where("ID_identite", "=", $id_identite)->get();
179
			if ((is_array($query)) && (count($query) > 0)) {
180
				foreach ($query as $obj) {
181
					return $obj->last_change_mdp;
182
				}
183
			}
184
		}

core/admin/contenus/GestionContenus.php 2 locations

@@ 30-34 (lines=5) @@
27
				$ordre = 1;
28
29
				$query = $dbc->select("ordre")->from("page")->orderBy("ordre", "DESC")->limit(0, 1)->get();
30
				if ((is_array($query)) && (count($query) > 0)) {
31
					foreach ($query as $obj) {
32
						$ordre = $obj->ordre;
33
					}
34
				}
35
36
				return $ordre;
37
			}
@@ 49-53 (lines=5) @@
46
47
			$query = $dbc->select("ID_page")->from("page")->where("titre", " LIKE ", '"%'.$parent.'%"', "", true)->get();
48
49
			if ((is_array($query)) && (count($query) == 1)) {
50
				foreach ($query as $obj) {
51
					return $obj->ID_page;
52
				}
53
			}
54
55
			return 0;
56
		}

core/admin/Admin.php 1 location

@@ 100-104 (lines=5) @@
97
98
			$query = $dbc->select("admin")->from("notification")->get();
99
100
			if ((is_array($query)) && (count($query) > 0)) {
101
				foreach ($query as $obj) {
102
					return $obj->admin;
103
				}
104
			}
105
		}
106
		//-------------------------- FIN GETTER ----------------------------------------------------------------------------//
107

core/modules/GestionModule.php 1 location

@@ 112-116 (lines=5) @@
109
110
			$query = $dbc->select("ID_module")->from("module")->where("url", "=", $url)->get();
111
112
			if ((is_array($query)) && (count($query) > 0)) {
113
				foreach ($query as $obj) {
114
					return $obj->ID_module;
115
				}
116
			}
117
		}
118
119