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

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