Code Duplication    Length = 18-18 lines in 2 locations

Zewa/View.php 2 locations

@@ 238-255 (lines=18) @@
235
     * @access protected
236
     * @return string css includes
237
     */
238
    protected function fetchCSS()
239
    {
240
        $app = App::getInstance();
241
        $sheets = $app->getConfiguration('view::css');
242
243
        $string = "";
244
245
        if (empty($sheets)) {
246
            return $string;
247
        }
248
249
        foreach ($sheets as $sheet) {
250
            $string .= '<link rel="stylesheet" href="' . $sheet .'">' . "\r\n";
251
        }
252
253
        return $string;
254
    }
255
256
    /**
257
     * Helper method for grabbing aggregated JS files
258
     *
@@ 262-279 (lines=18) @@
259
     * @access protected
260
     * @return string JS includes
261
     */
262
    protected function fetchJS()
263
    {
264
265
        $app = App::getInstance();
266
        $scripts = $app->getConfiguration('view::js');
267
        $string = "<script>baseURL = '" . $this->baseURL() . "/'</script>";
268
269
        if (empty($scripts)) {
270
            return $string;
271
        }
272
273
        foreach ($scripts as $script) {
274
            $string .= '<script src="' . $script . '"></script>' . "\r\n";
275
        }
276
277
        return $string;
278
    }
279
280
    /**
281
     * Helper method for adding css files for aggregation/render
282
     *