@@ -60,7 +60,7 @@ |
||
60 | 60 | ): void { |
61 | 61 | $this->assetsCollector->add( |
62 | 62 | $type, |
63 | - array_map(function ($item) { |
|
63 | + array_map(function($item) { |
|
64 | 64 | if ($this->loader === null) { |
65 | 65 | return $item; |
66 | 66 | } |
@@ -41,12 +41,12 @@ |
||
41 | 41 | $this->filePath = $environment->getCompileDir() . DIRECTORY_SEPARATOR . $filename; |
42 | 42 | $this->fileUrl = $environment->getBaseUrl() . '/' . str_replace(DIRECTORY_SEPARATOR, '/', $filename); |
43 | 43 | |
44 | - $this->notCollect = array_filter($assets, function ($asset) { |
|
44 | + $this->notCollect = array_filter($assets, function($asset) { |
|
45 | 45 | /** @var Asset $asset */ |
46 | 46 | return $asset->getOptions()->isNotCollect(); |
47 | 47 | }); |
48 | 48 | |
49 | - $this->assets = array_filter($assets, function ($asset) { |
|
49 | + $this->assets = array_filter($assets, function($asset) { |
|
50 | 50 | /** @var Asset $asset */ |
51 | 51 | return !$asset->getOptions()->isNotCollect(); |
52 | 52 | }); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | $result = preg_replace_callback( |
38 | 38 | '/(url\([\'"]?)(?!["\'a-z]+:|[\'"]?\/{2})(.+?[^\'"])([\'"]?\))/i', |
39 | - function (array $m) { |
|
39 | + function(array $m) { |
|
40 | 40 | $normalizedPath = $this->getNormalizedPath($m[2]); |
41 | 41 | if ($normalizedPath === false) { |
42 | 42 | return $m[1] . $m[2] . $m[3]; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function getResult(): array |
20 | 20 | { |
21 | - $cacheDir = $this->environment->getCompileDir().'/.cache'; |
|
21 | + $cacheDir = $this->environment->getCompileDir() . '/.cache'; |
|
22 | 22 | |
23 | 23 | $result = []; |
24 | 24 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | * TODO |
46 | 46 | * @psalm-suppress PossiblyNullOperand |
47 | 47 | */ |
48 | - $cacheFile = $cacheDir.'/'.$asset->getId(); |
|
49 | - if(!file_exists($cacheFile) || (filemtime($cacheFile) + $this->environment->getCacheTime()) < time()){ |
|
48 | + $cacheFile = $cacheDir . '/' . $asset->getId(); |
|
49 | + if (!file_exists($cacheFile) || (filemtime($cacheFile) + $this->environment->getCacheTime()) < time()) { |
|
50 | 50 | (new Reader($asset, $this->environment, $this->logger))->replaceRelativeUrlsAndCreatedSymlinks(); |
51 | 51 | Helpers::createEmptyFile($cacheFile, $this->logger); |
52 | 52 | } |