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