Completed
Push — master ( 437e57...ab0a93 )
by Michal
03:33 queued 10s
created
src/Webrouse/AssetMacro/DI/Extension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 			'versions.json',
23 23
 			'rev-manifest.json',
24 24
 		],
25
-		'missingAsset' => 'notice',    // exception, notice, or ignore
25
+		'missingAsset' => 'notice', // exception, notice, or ignore
26 26
         'missingManifest' => 'notice', // exception, notice, or ignore
27
-		'missingVersion' => 'ignore',  // exception, notice, or ignore
27
+		'missingVersion' => 'ignore', // exception, notice, or ignore
28 28
 	];
29 29
 
30 30
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	private function validateChoices($key, array $choices)
55 55
 	{
56
-		if ( ! in_array($this->config[$key], $choices)) {
56
+		if (!in_array($this->config[$key], $choices)) {
57 57
 			throw new UnexpectedValueException(sprintf(
58 58
 				"Unexpected value '%s' of '%s' configuration key. Allowed values: %s.",
59 59
 				$this->config[$key],
Please login to merge, or discard this patch.
src/Webrouse/AssetMacro/AssetMacro.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,10 +74,9 @@  discard block
 block discarded – undo
74 74
 
75 75
 		// Get asset version
76 76
         try {
77
-            $versions = $config['revManifest'] ?:
78
-                self::autodetectVersions($absolutePath, $wwwDir, $config['autodetect']);
77
+            $versions = $config['revManifest'] ?: self::autodetectVersions($absolutePath, $wwwDir, $config['autodetect']);
79 78
             $version = self::getAssetVersion($versions, $absolutePath, $needed, $config);
80
-        } catch(ManifestNotFoundException $e) {
79
+        } catch (ManifestNotFoundException $e) {
81 80
 		    self::throwError($e, $config['missingManifest'], $needed);
82 81
             $version = 'unknown';
83 82
         }
@@ -98,7 +97,7 @@  discard block
 block discarded – undo
98 97
 	{
99 98
 		return Strings::replace($format,
100 99
 			'/%([^%]+)%/',
101
-			function ($matches) use ($basePath, $format, $relativePath, $version) {
100
+			function($matches) use ($basePath, $format, $relativePath, $version) {
102 101
 				switch ($matches[1]) {
103 102
 					case 'url':
104 103
 						return sprintf("%s/%s?v=%s", $basePath, $relativePath, $version);
@@ -175,8 +174,8 @@  discard block
 block discarded – undo
175 174
 	private static function getAssetVersion($assetsVersions, $absolutePath, $needed, 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 ManifestNotFoundException(sprintf("Revision manifest 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.