Code Duplication    Length = 12-14 lines in 2 locations

core/Navigation.php 2 locations

@@ 99-110 (lines=12) @@
96
				->where("affiche", "=", 1)
97
				->get();
98
99
			if (is_array($query) && (count($query) > 0)) {
100
				foreach ($query as $obj) {
101
					$sous_menu[] = [
102
						"id" => $obj->ID_page,
103
						"titre" => $obj->titre,
104
						"lien_page" => $this->getLienPage($obj->url),
105
						"balise_title" => $obj->balise_title,
106
						"type" => "page",
107
						"target" => $obj->target,
108
					];
109
				}
110
			}
111
112
			return $sous_menu;
113
		}
@@ 132-145 (lines=14) @@
129
				->where("navigation.ID_module", "=", "module.ID_module", "", true)
130
				->get();
131
132
			if (is_array($query) && (count($query) > 0)) {
133
				foreach ($query as $obj) {
134
					$nav = [
135
						"id" => $obj->ID_module,
136
						"titre" => $obj->nom_module,
137
						"lien_page" => $this->getLienPage($obj->url),
138
						"balise_title" => $obj->nom_module,
139
						"type" => "module",
140
						"target" => $obj->target,
141
					];
142
					
143
					return $nav;
144
				}
145
			}
146
		}
147
148
		/*to verify if page exist*/