Code Duplication    Length = 18-18 lines in 2 locations

Zewa/View.php 2 locations

@@ 212-229 (lines=18) @@
209
//        return true;
210
//    }
211
212
    protected function fetchCSS()
213
    {
214
        $app = App::getInstance();
215
        $sheets = $app->getConfiguration('view::css');
216
217
        $string = "";
218
219
        if (empty($sheets)) {
220
            return $string;
221
        }
222
223
        foreach ($sheets as $sheet) {
224
            $string .= '<link rel="stylesheet" href="' . $sheet .'">' . "\r\n";
225
        }
226
227
        return $string;
228
    }
229
230
    protected function fetchJS()
231
    {
232
@@ 230-247 (lines=18) @@
227
        return $string;
228
    }
229
230
    protected function fetchJS()
231
    {
232
233
        $app = App::getInstance();
234
        $scripts = $app->getConfiguration('view::js');
235
        $string = "<script>baseURL = '" . $this->baseURL() . "/'</script>";
236
237
        if (empty($scripts)) {
238
            return $string;
239
        }
240
241
        foreach ($scripts as $script) {
242
            $string .= '<script src="' . $script . '"></script>' . "\r\n";
243
        }
244
245
        return $string;
246
    }
247
248
    public function addCSS($sheets = [], $place = 'append')
249
    {
250
        $app = App::getInstance();