Code Duplication    Length = 15-19 lines in 2 locations

components/CSS.php 1 location

@@ 27-45 (lines=19) @@
24
25
        $toMinify = [];
26
27
        if (!empty($cssFiles)) {
28
            foreach ($cssFiles as $file => $html) {
29
                if ($this->thisFileNeedMinify($file, $html)) {
30
                    if ($this->view->concatCss) {
31
                        $toMinify[$file] = $html;
32
                    } else {
33
                        $this->process([$file => $html]);
34
                    }
35
                } else {
36
                    if (!empty($toMinify)) {
37
                        $this->process($toMinify);
38
39
                        $toMinify = [];
40
                    }
41
42
                    $this->view->cssFiles[$file] = $html;
43
                }
44
            }
45
        }
46
47
        if (!empty($toMinify)) {
48
            $this->process($toMinify);

components/JS.php 1 location

@@ 40-54 (lines=15) @@
37
                    $toMinify = [];
38
39
                    foreach ($files as $file => $html) {
40
                        if ($this->thisFileNeedMinify($file, $html)) {
41
                            if ($this->view->concatJs) {
42
                                $toMinify[$file] = $html;
43
                            } else {
44
                                $this->process($position, $jsOptions, [$file => $html]);
45
                            }
46
                        } else {
47
                            if (!empty($toMinify)) {
48
                                $this->process($position, $jsOptions, $toMinify);
49
50
                                $toMinify = [];
51
                            }
52
53
                            $this->view->jsFiles[$position][$file] = $html;
54
                        }
55
                    }
56
57
                    if (!empty($toMinify)) {