Completed
Push — master ( 367234...fa945f )
by Michal
02:29
created
src/Webrouse/AssetMacro/AssetMacro.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 		// Get asset version
76 76
 		$versions = $config['versions'] === self::VERSIONS_AUTODETECT ?
77
-			self::autodetectVersions($absolutePath, $wwwDir, $config['autodetectPaths']) :
78
-			$config['versions'];
77
+			self::autodetectVersions($absolutePath, $wwwDir, $config['autodetectPaths']) : $config['versions'];
79 78
 		$version = self::getAssetVersion($versions, $absolutePath, $config);
80 79
 
81 80
 		return self::formatOutput($format, $basePath, $relativePath, $version);
@@ -94,7 +93,7 @@  discard block
 block discarded – undo
94 93
 	{
95 94
 		return Strings::replace($format,
96 95
 			'/%([^%]+)%/',
97
-			function ($matches) use ($basePath, $format, $relativePath, $version) {
96
+			function($matches) use ($basePath, $format, $relativePath, $version) {
98 97
 				switch ($matches[1]) {
99 98
 					case 'url':
100 99
 						return sprintf("%s/%s?v=%s", $basePath, $relativePath, $version);
@@ -126,8 +125,8 @@  discard block
 block discarded – undo
126 125
 	 */
127 126
 	private static function processArguments($path, array $args)
128 127
 	{
129
-		$format = isset($args['format']) ? $args['format'] : (isset($args[0]) ?  $args[0] : '%url%');
130
-		$needed = isset($args['needed']) ? $args['needed'] : (isset($args[1]) ?  $args[1] : TRUE);
128
+		$format = isset($args['format']) ? $args['format'] : (isset($args[0]) ? $args[0] : '%url%');
129
+		$needed = isset($args['needed']) ? $args['needed'] : (isset($args[1]) ? $args[1] : TRUE);
131 130
 
132 131
 		Validators::assert($path, 'string', 'path');
133 132
 		Validators::assert($format, 'string', 'format');
@@ -175,8 +174,8 @@  discard block
 block discarded – undo
175 174
 	private static function getAssetVersion($assetsVersions, $absolutePath, array $config)
176 175
 	{
177 176
 		// Versions can be array or path to JSON file
178
-		if ( ! is_array($assetsVersions)) {
179
-			if ( ! file_exists($assetsVersions)) {
177
+		if (!is_array($assetsVersions)) {
178
+			if (!file_exists($assetsVersions)) {
180 179
 				throw new FileNotFoundException(sprintf("Asset versions file not found: '%s'.", $assetsVersions));
181 180
 			}
182 181
 			$assetsVersions = Json::decode(file_get_contents($assetsVersions), Json::FORCE_ARRAY);
Please login to merge, or discard this patch.