Code Duplication    Length = 17-17 lines in 2 locations

src/allejo/stakx/Manager/MenuManager.php 1 location

@@ 30-46 (lines=17) @@
27
     *
28
     * @return JailObject[]
29
     */
30
    public function getSiteMenu ()
31
    {
32
        $jailedMenu = array();
33
34
        foreach ($this->siteMenu as $key => $value)
35
        {
36
            // If it's an array, it means the parent is hidden from the site menu therefore its children should be too
37
            if (is_array($this->siteMenu[$key]))
38
            {
39
                continue;
40
            }
41
42
            $jailedMenu[$key] = $value->createJail();
43
        }
44
45
        return $jailedMenu;
46
    }
47
48
    /**
49
     * @param PageView[] $pageViews

src/allejo/stakx/Manager/PageManager.php 1 location

@@ 127-143 (lines=17) @@
124
        return $this->flatPages;
125
    }
126
127
    public function getJailedStaticPages ()
128
    {
129
        $jailedObjects = array();
130
131
        foreach ($this->flatPages as $key => $value)
132
        {
133
            // If it's an array, it means the parent is hidden from the site menu therefore its children should be too
134
            if (is_array($value))
135
            {
136
                continue;
137
            }
138
139
            $jailedObjects[$key] = $value->createJail();
140
        }
141
142
        return $jailedObjects;
143
    }
144
145
    /**
146
     * Go through all of the PageView directories and create a respective PageView for each and classify them as a