Code Duplication    Length = 11-12 lines in 2 locations

src/Charcoal/Cms/Service/Loader/SectionLoader.php 2 locations

@@ 181-191 (lines=11) @@
178
     * @param  string $route The route to resolve.
179
     * @return string
180
     */
181
    public function resolveRoute($route)
182
    {
183
        $routes = $this->sectionRoutes();
184
        $sId = $this->resolveSectionId($route);
185
186
        if (!isset($routes['sections'][$sId])) {
187
            return '';
188
        }
189
190
        return $routes['sections'][$sId];
191
    }
192
193
    /**
194
     * Resolve section ID from route slug.
@@ 198-209 (lines=12) @@
195
     * @param  string $route The route to resolve.
196
     * @return integer
197
     */
198
    public function resolveSectionId($route)
199
    {
200
        $routes = $this->sectionRoutes();
201
202
        if (!isset($routes['routes'][$route])) {
203
            return '';
204
        }
205
206
        $sId = $routes['routes'][$route];
207
208
        return $sId;
209
    }
210
211
    // ==========================================================================
212
    // GETTERS