Code Duplication    Length = 14-14 lines in 2 locations

system/modules/View/View.php 2 locations

@@ 448-461 (lines=14) @@
445
        $this->widget('View\bodyEnd', compact('options'));
446
    }
447
448
    public function getScripts() {
449
        $scripts = [];
450
        if (!empty($this->libAssets['js'])) {
451
            $this->genScriptArray($this->libAssets['js'], 'libs', $scripts);
452
        }
453
        if (!empty($this->dynAssets['js'])) {
454
            $this->genScriptArray($this->dynAssets['js'], 'custom', $scripts);
455
        }
456
        if (!empty($this->template->config['js'])) {
457
            $this->genScriptArray($this->template->config['js'], 'template', $scripts);
458
        }
459
        return $scripts;
460
    }
461
462
    public function genScriptArray($jsArray, $type = 'custom', &$resultArray) {
463
        switch ($type) {
464
            case 'libs':
@@ 298-311 (lines=14) @@
295
        echo "\n        <link href='/{$cacheDir}/all{$timeMd5}.css' rel='stylesheet' type='text/css' />";
296
    }
297
298
    public function getCss() {
299
        $css = [];
300
        if (!empty($this->libAssets['css'])) {
301
            $this->ResolveCssHref($this->libAssets['css'], 'libs', $css);
302
        }
303
        if (!empty($this->template->config['css'])) {
304
            $this->ResolveCssHref($this->template->config['css'], 'template', $css);
305
        }
306
        if (!empty($this->dynAssets['css'])) {
307
            $this->ResolveCssHref($this->dynAssets['css'], 'custom', $css);
308
        }
309
        return $css;
310
    }
311
312
    public function ResolveCssHref($cssArray, $type = 'custom', &$hrefs) {
313
        switch ($type) {
314
            case 'libs':