Code Duplication    Length = 5-5 lines in 2 locations

core/Navigation.php 2 locations

@@ 58-62 (lines=5) @@
55
				->where("page.parent", "=", 0)
56
				->get();
57
58
			if (is_array($query) && (count($query) > 0)) {
59
				foreach ($query as $obj) {
60
					return [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title, $this->getSousMenu($id_page)];
61
				}
62
			}
63
		}
64
65
		private function getSousMenu($id_page) {
@@ 75-79 (lines=5) @@
72
				->where("affiche", "=", 1)
73
				->get();
74
75
			if (is_array($query) && (count($query) > 0)) {
76
				foreach ($query as $obj) {
77
					$sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title,];
78
				}
79
			}
80
81
			return $sous_menu;
82
		}