Completed
Branch master (823b8c)
by Michal
03:50 queued 02:20
created
src/Webrouse/AssetMacro/AssetMacro.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -167,8 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 		// Check if asset exists
169 169
 		$filePath = $isVersion ?
170
-			($wwwDir . DIRECTORY_SEPARATOR . $relativePath) :
171
-			($wwwDir . DIRECTORY_SEPARATOR . Utils::normalizePath($revision));
170
+			($wwwDir . DIRECTORY_SEPARATOR . $relativePath) : ($wwwDir . DIRECTORY_SEPARATOR . Utils::normalizePath($revision));
172 171
 
173 172
 		return [$revision, $isVersion, $filePath];
174 173
 	}
@@ -260,7 +259,7 @@  discard block
 block discarded – undo
260 259
 
261 260
 		return Strings::replace($format,
262 261
 			'/%([^%]+)%/',
263
-			function ($matches) use ($format, $absolutePath, $relativePath, $basePath, $revision, $revisionIsVersion) {
262
+			function($matches) use ($format, $absolutePath, $relativePath, $basePath, $revision, $revisionIsVersion) {
264 263
 				switch ($matches[1]) {
265 264
 					case 'content':
266 265
 						return trim(file_get_contents($absolutePath));
@@ -272,8 +271,7 @@  discard block
 block discarded – undo
272 271
 						return $relativePath;
273 272
 					case 'url':
274 273
 						return $revisionIsVersion ?
275
-							sprintf("%s/%s?v=%s", $basePath, $relativePath, $revision) :
276
-							sprintf("%s/%s", $basePath, $relativePath);
274
+							sprintf("%s/%s?v=%s", $basePath, $relativePath, $revision) : sprintf("%s/%s", $basePath, $relativePath);
277 275
 					default:
278 276
 						$msg = sprintf(
279 277
 							"Asset macro: Invalid variable '%s' in format '%s'. " .
Please login to merge, or discard this patch.