@@ -80,7 +80,7 @@ |
||
80 | 80 | // returned in $items. |
81 | 81 | $links = $this->minifyFile($minifiedFile, $cacheItems, $items) |
82 | 82 | // Generate the links |
83 | - ->generateLinks($items); |
|
83 | + ->generateLinks($items); |
|
84 | 84 | |
85 | 85 | return $indent . implode($this->escape($this->getSeparator()) . $indent, $links); |
86 | 86 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function toString($indent = null): string |
61 | 61 | { |
62 | 62 | // If configuration tells us minifying is not enabled, use the default view helper. |
63 | - if (! $this->options['enabled']) { |
|
63 | + if (!$this->options['enabled']) { |
|
64 | 64 | return parent::toString($indent); |
65 | 65 | } |
66 | 66 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | { |
95 | 95 | $items = []; |
96 | 96 | foreach ($this as $index => $item) { |
97 | - if (! $item->href || $item->type != 'text/css') { |
|
97 | + if (!$item->href || $item->type != 'text/css') { |
|
98 | 98 | continue; |
99 | 99 | } |
100 | 100 | $localUri = str_replace($this->baseUrl, '', preg_replace('/\?.*/', '', $this->publicDir . $item->href)); |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | */ |
143 | 143 | private function minifyFile(string $minifiedFileName, array $cacheItems, array &$items): HeadLink |
144 | 144 | { |
145 | - if (! empty($cacheItems)) { |
|
146 | - if (! is_file($this->cacheDir . $minifiedFileName)) { |
|
145 | + if (!empty($cacheItems)) { |
|
146 | + if (!is_file($this->cacheDir . $minifiedFileName)) { |
|
147 | 147 | $minifier = new Minify\CSS(); |
148 | - array_map(function ($uri) use ($minifier) { |
|
148 | + array_map(function($uri) use ($minifier) { |
|
149 | 149 | $minifier->add($uri); |
150 | 150 | }, $cacheItems); |
151 | 151 | $minifier->minify($this->cacheDir . $minifiedFileName); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function toString($indent = null): string |
62 | 62 | { |
63 | 63 | // If configuration tells us minifying is not enabled, use the default view helper. |
64 | - if (! $this->options['enabled']) { |
|
64 | + if (!$this->options['enabled']) { |
|
65 | 65 | return parent::toString($indent); |
66 | 66 | } |
67 | 67 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $items = []; |
97 | 97 | foreach ($this as $index => $item) { |
98 | - if ($item->type !== 'text/javascript' && (! @$item->attributes['src'] || ! $item->source)) { |
|
98 | + if ($item->type !== 'text/javascript' && (!@$item->attributes['src'] || !$item->source)) { |
|
99 | 99 | $items[] = $item; |
100 | 100 | continue; |
101 | 101 | } |
@@ -151,10 +151,10 @@ discard block |
||
151 | 151 | */ |
152 | 152 | private function minifyFile(string $minifiedFileName, array $cacheItems, array &$items): HeadScript |
153 | 153 | { |
154 | - if (! empty($cacheItems)) { |
|
155 | - if (! is_file($this->cacheDir . $minifiedFileName)) { |
|
154 | + if (!empty($cacheItems)) { |
|
155 | + if (!is_file($this->cacheDir . $minifiedFileName)) { |
|
156 | 156 | $minifier = new Minify\JS(); |
157 | - array_map(function ($uri) use ($minifier) { |
|
157 | + array_map(function($uri) use ($minifier) { |
|
158 | 158 | $minifier->add($uri); |
159 | 159 | }, $cacheItems); |
160 | 160 | $minifier->minify($this->cacheDir . $minifiedFileName); |