@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function macroAsset(Latte\MacroNode $node, Latte\PhpWriter $writer) |
39 | 39 | { |
40 | - $content = self::class . '::appendVersion(%node.word, $template->global->' . self::VERSIONS_PROVIDER . ', $template->global->' . self::WWW_DIR_PROVIDER . ')'; |
|
41 | - return $writer->write('echo $basePath . "/" . %escape(' . $content .')'); |
|
40 | + $content = self::class . '::appendVersion(%node.word, $template->global->' . self::VERSIONS_PROVIDER . ', $template->global->' . self::WWW_DIR_PROVIDER . ')'; |
|
41 | + return $writer->write('echo $basePath . "/" . %escape(' . $content . ')'); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $versions = Json::decode(file_get_contents($versions), Json::FORCE_ARRAY); |
72 | 72 | } |
73 | 73 | |
74 | - $assetHash = 'unknown'; |
|
75 | - foreach($versions as $path => $hash) { |
|
74 | + $assetHash = 'unknown'; |
|
75 | + foreach ($versions as $path => $hash) { |
|
76 | 76 | // Test if path from version file (may be relative) is in asset path |
77 | 77 | if (Strings::endsWith($absolutePath, $path)) { |
78 | 78 | $assetHash = $hash; |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | |
104 | 104 | // Iterate over parent directories (stop in www dir) |
105 | 105 | $dir = dirname($absolutePath); |
106 | - while(Strings::startsWith($dir, $wwwDir)) { |
|
107 | - foreach(self::VERSIONS_AUTODETECT_PATHS as $path) { |
|
106 | + while (Strings::startsWith($dir, $wwwDir)) { |
|
107 | + foreach (self::VERSIONS_AUTODETECT_PATHS as $path) { |
|
108 | 108 | $path = $dir . DIRECTORY_SEPARATOR . $path; |
109 | 109 | if (file_exists($path)) { |
110 | 110 | return $path; |