@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function toString($indent = null): string |
| 44 | 44 | { |
| 45 | 45 | // If configuration tells us minifying is not enabled, use the default view helper. |
| 46 | - if (! $this->options['enabled']) { |
|
| 46 | + if (!$this->options['enabled']) { |
|
| 47 | 47 | return parent::toString($indent); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | $items = []; |
| 85 | 85 | foreach ($this as $index => $item) { |
| 86 | - if ($item->type !== 'text/javascript' && (! @$item->attributes['src'] || ! $item->source)) { |
|
| 86 | + if ($item->type !== 'text/javascript' && (!@$item->attributes['src'] || !$item->source)) { |
|
| 87 | 87 | $items[] = $item; |
| 88 | 88 | continue; |
| 89 | 89 | } |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | private function minifyfile($minifiedFile, $cacheDir, array $cacheItems, array &$items) |
| 127 | 127 | { |
| 128 | - if (! is_file($cacheDir . $minifiedFile) && ! empty($cacheItems)) { |
|
| 128 | + if (!is_file($cacheDir . $minifiedFile) && !empty($cacheItems)) { |
|
| 129 | 129 | $minifier = new Minify\JS(); |
| 130 | - array_map(function ($uri) use ($minifier) { |
|
| 130 | + array_map(function($uri) use ($minifier) { |
|
| 131 | 131 | $minifier->add($uri); |
| 132 | 132 | }, $cacheItems); |
| 133 | 133 | $minifier->minify($cacheDir . $minifiedFile); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | // returned in $items. |
| 69 | 69 | $links = $this->minifyFile($minifiedFile, $cacheDir, $cacheItems, $items) |
| 70 | 70 | // Generate the links |
| 71 | - ->generateLinks($items); |
|
| 71 | + ->generateLinks($items); |
|
| 72 | 72 | |
| 73 | 73 | /** @noinspection PhpUndefinedMethodInspection */ |
| 74 | 74 | return $indent . implode($this->escape($this->getSeparator()) . $indent, $links); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function toString($indent = null): string |
| 44 | 44 | { |
| 45 | 45 | // If configuration tells us minifying is not enabled, use the default view helper. |
| 46 | - if (! $this->options['enabled']) { |
|
| 46 | + if (!$this->options['enabled']) { |
|
| 47 | 47 | return parent::toString($indent); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $items = []; |
| 86 | 86 | foreach ($this as $index => $item) { |
| 87 | - if (! $item->href || $item->type != 'text/css') { |
|
| 87 | + if (!$item->href || $item->type != 'text/css') { |
|
| 88 | 88 | continue; |
| 89 | 89 | } |
| 90 | 90 | $localUri = str_replace($this->baseUrl, '', preg_replace('/\?.*/', '', $publicDir . $item->href)); |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | private function minifyFile($minifiedFile, $cacheDir, array $cacheItems, array &$items) |
| 120 | 120 | { |
| 121 | - if (! is_file($cacheDir . $minifiedFile) && ! empty($cacheItems)) { |
|
| 121 | + if (!is_file($cacheDir . $minifiedFile) && !empty($cacheItems)) { |
|
| 122 | 122 | $minifier = new Minify\CSS(); |
| 123 | - array_map(function ($uri) use ($minifier) { |
|
| 123 | + array_map(function($uri) use ($minifier) { |
|
| 124 | 124 | $minifier->add($uri); |
| 125 | 125 | }, $cacheItems); |
| 126 | 126 | $minifier->minify($cacheDir . $minifiedFile); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $helper = clone $this->helper; |
| 78 | 78 | $helper->appendFile('/js/test1.js') |
| 79 | - ->appendFile('/js/test2.js'); |
|
| 79 | + ->appendFile('/js/test2.js'); |
|
| 80 | 80 | |
| 81 | 81 | $result = $helper->toString(); |
| 82 | 82 | $domDocument = new \DOMDocument(); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $helper = clone $this->helper; |
| 98 | 98 | $helper->appendFile('/js/test1.js') |
| 99 | - ->prependFile('/js/test2.js'); |
|
| 99 | + ->prependFile('/js/test2.js'); |
|
| 100 | 100 | |
| 101 | 101 | $result = $helper->toString(); |
| 102 | 102 | $domDocument = new \DOMDocument(); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $helper = clone $this->helper; |
| 78 | 78 | $helper->appendStylesheet('/css/test1.css') |
| 79 | - ->appendStylesheet('/css/test2.css'); |
|
| 79 | + ->appendStylesheet('/css/test2.css'); |
|
| 80 | 80 | |
| 81 | 81 | $result = $helper->toString(); |
| 82 | 82 | $domDocument = new \DOMDocument(); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $helper = clone $this->helper; |
| 98 | 98 | $helper->appendStylesheet('/css/test1.css') |
| 99 | - ->prependStylesheet('/css/test2.css'); |
|
| 99 | + ->prependStylesheet('/css/test2.css'); |
|
| 100 | 100 | |
| 101 | 101 | $result = $helper->toString(); |
| 102 | 102 | $domDocument = new \DOMDocument(); |