Completed
Push — master ( 5b929a...60b4d2 )
by Michal
03:33 queued 02:12
created
src/Webrouse/AssetMacro/DI/Extension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 			'rev-manifest.json',
24 24
 		],
25 25
 		'missingAsset' => 'exception', // exception, notice, or ignore
26
-		'missingVersion' => 'ignore',  // exception, notice, or ignore
26
+		'missingVersion' => 'ignore', // exception, notice, or ignore
27 27
 	];
28 28
 
29 29
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	private function validateChoices($key, array $choices)
53 53
 	{
54
-		if ( ! in_array($this->config[$key], $choices)) {
54
+		if (!in_array($this->config[$key], $choices)) {
55 55
 			throw new UnexpectedValueException(sprintf(
56 56
 				"Unexpected value '%s' of '%s' configuration key. Allowed values: %s.",
57 57
 				$this->config[$key],
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
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 		// Get asset version
75 75
 		$versions = $config['versions'] === self::VERSIONS_AUTODETECT ?
76
-			self::autodetectVersions($absolutePath, $wwwDir, $config['autodetectPaths']) :
77
-			$config['versions'];
76
+			self::autodetectVersions($absolutePath, $wwwDir, $config['autodetectPaths']) : $config['versions'];
78 77
 		$version = self::getAssetVersion($versions, $absolutePath, $config);
79 78
 
80 79
 		return self::formatOutput($format, $basePath, $relativePath, $version);
@@ -93,7 +92,7 @@  discard block
 block discarded – undo
93 92
 	{
94 93
 		return Strings::replace($format,
95 94
 			'/%([^%]+)%/',
96
-			function ($matches) use ($basePath, $format, $relativePath, $version) {
95
+			function($matches) use ($basePath, $format, $relativePath, $version) {
97 96
 				switch ($matches[1]) {
98 97
 					case 'url':
99 98
 						return sprintf("%s/%s?v=%s", $basePath, $relativePath, $version);
@@ -174,8 +173,8 @@  discard block
 block discarded – undo
174 173
 	private static function getAssetVersion($assetsVersions, $absolutePath, array $config)
175 174
 	{
176 175
 		// Versions can be array or path to JSON file
177
-		if ( ! is_array($assetsVersions)) {
178
-			if ( ! file_exists($assetsVersions)) {
176
+		if (!is_array($assetsVersions)) {
177
+			if (!file_exists($assetsVersions)) {
179 178
 				throw new FileNotFoundException(sprintf("Asset versions file not found: '%s'.", $assetsVersions));
180 179
 			}
181 180
 			$assetsVersions = Json::decode(file_get_contents($assetsVersions), Json::FORCE_ARRAY);
Please login to merge, or discard this patch.