Completed
Push — master ( 367234...fa945f )
by Michal
02:29
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   +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.