Code Duplication    Length = 11-11 lines in 2 locations

src/Admin.php 1 location

@@ 56-66 (lines=11) @@
53
                        ]);
54
                    }
55
                }
56
            } elseif (is_array($items)) { // child
57
                $childs = $this->getMenus($items);
58
                if ($childs->isNotEmpty()) {
59
                    $menu = [
60
                        'title' => $key,
61
                        'url'   => '/#',
62
                        'child' => $childs,
63
                    ];
64
                    $menus->push($menu);
65
                }
66
            }
67
        }
68
        return $menus;
69
    }

src/Http/Middleware/AdminMenu.php 1 location

@@ 51-61 (lines=11) @@
48
                        ]);
49
                    }
50
                }
51
            } elseif (is_array($items)) { // child
52
                $childs = $this->getAdminMenu($items);
53
                if ($childs->isNotEmpty()) {
54
                    $menu = [
55
                        'title' => $key,
56
                        'url'   => '/#',
57
                        'child' => $childs,
58
                    ];
59
                    $menus->push($menu);
60
                }
61
            }
62
        }
63
        return $menus;
64
    }