Code Duplication    Length = 13-13 lines in 2 locations

View.php 2 locations

@@ 262-274 (lines=13) @@
259
260
                    $toMinify = [];
261
262
                    foreach ($files as $file => $html) {
263
                        if ($this->thisFileNeedMinify($file, $html)) {
264
                            $toMinify[$file] = $html;
265
                        } else {
266
                            if (!empty($toMinify)) {
267
                                $this->processMinifyJs($position, $toMinify);
268
269
                                $toMinify = [];
270
                            }
271
272
                            $this->jsFiles[$position][$file] = $html;
273
                        }
274
                    }
275
276
                    if (!empty($toMinify)) {
277
                        $this->processMinifyJs($position, $toMinify);
@@ 151-163 (lines=13) @@
148
149
            $toMinify = [];
150
151
            foreach ($cssFiles as $file => $html) {
152
                if ($this->thisFileNeedMinify($file, $html)) {
153
                    $toMinify[$file] = $html;
154
                } else {
155
                    if (!empty($toMinify)) {
156
                        $this->processMinifyCss($toMinify);
157
158
                        $toMinify = [];
159
                    }
160
161
                    $this->cssFiles[$file] = $html;
162
                }
163
            }
164
165
            if (!empty($toMinify)) {
166
                $this->processMinifyCss($toMinify);