Code Duplication    Length = 13-13 lines in 2 locations

components/CSS.php 1 location

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

components/JS.php 1 location

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