| @@ 28-46 (lines=19) @@ | ||
| 25 | ||
| 26 | $toMinify = []; |
|
| 27 | ||
| 28 | if (!empty($cssFiles)) { |
|
| 29 | foreach ($cssFiles as $file => $html) { |
|
| 30 | if ($this->thisFileNeedMinify($file, $html)) { |
|
| 31 | if ($this->view->concatCss) { |
|
| 32 | $toMinify[$file] = $html; |
|
| 33 | } else { |
|
| 34 | $this->process([$file => $html]); |
|
| 35 | } |
|
| 36 | } else { |
|
| 37 | if (!empty($toMinify)) { |
|
| 38 | $this->process($toMinify); |
|
| 39 | ||
| 40 | $toMinify = []; |
|
| 41 | } |
|
| 42 | ||
| 43 | $this->view->cssFiles[$file] = $html; |
|
| 44 | } |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| 48 | if (!empty($toMinify)) { |
|
| 49 | $this->process($toMinify); |
|
| @@ 41-55 (lines=15) @@ | ||
| 38 | $toMinify = []; |
|
| 39 | ||
| 40 | foreach ($files as $file => $html) { |
|
| 41 | if ($this->thisFileNeedMinify($file, $html)) { |
|
| 42 | if ($this->view->concatJs) { |
|
| 43 | $toMinify[$file] = $html; |
|
| 44 | } else { |
|
| 45 | $this->process($position, $jsOptions, [$file => $html]); |
|
| 46 | } |
|
| 47 | } else { |
|
| 48 | if (!empty($toMinify)) { |
|
| 49 | $this->process($position, $jsOptions, $toMinify); |
|
| 50 | ||
| 51 | $toMinify = []; |
|
| 52 | } |
|
| 53 | ||
| 54 | $this->view->jsFiles[$position][$file] = $html; |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| 58 | if (!empty($toMinify)) { |
|