Completed
Push — master ( b77dd2...b4def4 )
by Michal
04:25
created
src/Webrouse/AssetMacro/Utils.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 	/**
13 13
 	 * @param string $path
14
-	 * @param string $separator
15 14
 	 * @return string
16 15
 	 */
17 16
 	public static function normalizePath($path)
Please login to merge, or discard this patch.
src/Webrouse/AssetMacro/AssetMacro.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		if ($config['existCheck'] === TRUE) {
77 77
 			$ds = DIRECTORY_SEPARATOR;
78 78
 			$filePath = $isVersion ? ($wwwDir . $ds . $path) : ($wwwDir . $ds . Utils::normalizePath($revision));
79
-			if ( ! file_exists($filePath)) {
79
+			if (!file_exists($filePath)) {
80 80
 				Utils::throwError(
81 81
 					new AssetNotFoundException(sprintf("Asset '%s' not found.", $filePath)),
82 82
 					$config['missingAsset'],
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 		return Strings::replace($format,
108 108
 			'/%([^%]+)%/',
109
-			function ($matches) use ($basePath, $format, $path, $revision, $isVersion) {
109
+			function($matches) use ($basePath, $format, $path, $revision, $isVersion) {
110 110
 				switch ($matches[1]) {
111 111
 					case 'raw':
112 112
 						return $revision;
@@ -116,8 +116,7 @@  discard block
 block discarded – undo
116 116
 						return $path;
117 117
 					case 'url':
118 118
 						return $isVersion ?
119
-							sprintf("%s/%s?v=%s", $basePath, $path, $revision) :
120
-							sprintf("%s/%s", $basePath, $path);
119
+							sprintf("%s/%s?v=%s", $basePath, $path, $revision) : sprintf("%s/%s", $basePath, $path);
121 120
 					default:
122 121
 						$msg = sprintf(
123 122
 							"Asset macro: Invalid variable '%s' in format '%s'. " .
@@ -169,7 +168,7 @@  discard block
 block discarded – undo
169 168
 
170 169
 		// Path to JSON manifest
171 170
 		if (is_string($manifest)) {
172
-			if ( ! file_exists($manifest)) {
171
+			if (!file_exists($manifest)) {
173 172
 				Utils::throwError(
174 173
 					new ManifestNotFoundException(sprintf("Manifest file not found: '%s'.", $manifest)),
175 174
 					$config['missingManifest'],
Please login to merge, or discard this patch.