Completed
Push — master ( 121335...68b8eb )
by Michal
03:32
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, -6 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		// Generate output according format argument
95 95
 		return Strings::replace($format,
96 96
 			'/%([^%]+)%/',
97
-			function ($matches) use ($basePath, $format, $relativePath, $version) {
97
+			function($matches) use ($basePath, $format, $relativePath, $version) {
98 98
 				switch ($matches[1]) {
99 99
 					case 'url':
100 100
 						return sprintf("%s/%s?v=%s", $basePath, $relativePath, $version);
@@ -131,19 +131,19 @@  discard block
 block discarded – undo
131 131
 		$needed = isset($args[2]) ? $args[2] : TRUE;
132 132
 
133 133
 		// Validate arguments
134
-		if ( ! is_string($relativePath)) {
134
+		if (!is_string($relativePath)) {
135 135
 			throw new InvalidArgumentException(sprintf(
136 136
 				"Asset macro: Invalid type of the first argument. Required string. Given %s.",
137 137
 				gettype($relativePath)
138 138
 			));
139 139
 		}
140
-		if ( ! is_string($format)) {
140
+		if (!is_string($format)) {
141 141
 			throw new InvalidArgumentException(sprintf(
142 142
 				"Asset macro: Invalid type of the second argument. Required string. Given %s.",
143 143
 				gettype($format)
144 144
 			));
145 145
 		}
146
-		if ( ! is_bool($needed)) {
146
+		if (!is_bool($needed)) {
147 147
 			throw new InvalidArgumentException(sprintf(
148 148
 				"Asset macro: Invalid type of the third argument. Required boolean. Given %s.",
149 149
 				gettype($needed)
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 	private static function getAssetVersion($assetsVersions, $absolutePath, array $config)
169 169
 	{
170 170
 		// Versions can be array or path to JSON file
171
-		if ( ! is_array($assetsVersions)) {
172
-			if ( ! file_exists($assetsVersions)) {
171
+		if (!is_array($assetsVersions)) {
172
+			if (!file_exists($assetsVersions)) {
173 173
 				throw new FileNotFoundException(sprintf("Asset versions file not found: '%s'.", $assetsVersions));
174 174
 			}
175 175
 			$assetsVersions = Json::decode(file_get_contents($assetsVersions), Json::FORCE_ARRAY);
Please login to merge, or discard this patch.