Code Duplication    Length = 10-10 lines in 2 locations

models/RouteModel.php 2 locations

@@ 64-73 (lines=10) @@
61
     *
62
     * @return bool
63
     */
64
    public function addNew(array $routes): bool
65
    {
66
        foreach ($routes as $route) {
67
            $this->manager->add($this->manager->createPermission('/' . trim($route, ' /')));
68
        }
69
70
        $this->invalidate();
71
72
        return true;
73
    }
74
75
    /**
76
     * Remove items
@@ 82-91 (lines=10) @@
79
     *
80
     * @return bool
81
     */
82
    public function remove(array $routes): bool
83
    {
84
        foreach ($routes as $route) {
85
            $item = $this->manager->createPermission('/' . trim($route, '/'));
86
            $this->manager->remove($item);
87
        }
88
        $this->invalidate();
89
90
        return true;
91
    }
92
93
    /**
94
     * Get available and assigned routes