Completed
Push — master ( bc3e86...3980d1 )
by Michal
03:02
created
src/Webrouse/AssetMacro/DI/Extension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         // Check the existence of asset file
32 32
         'existCheck' => TRUE,
33 33
         // Error handling
34
-		'missingAsset' => 'notice',    // exception, notice, or ignore
34
+		'missingAsset' => 'notice', // exception, notice, or ignore
35 35
 		'missingManifest' => 'notice', // exception, notice, or ignore
36
-		'missingRevision' => 'ignore',  // exception, notice, or ignore
36
+		'missingRevision' => 'ignore', // exception, notice, or ignore
37 37
 	];
38 38
 
39 39
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	private function validateChoices($key, array $choices)
70 70
 	{
71
-		if ( ! in_array($this->config[$key], $choices)) {
71
+		if (!in_array($this->config[$key], $choices)) {
72 72
 			throw new UnexpectedValueException(sprintf(
73 73
 				"Unexpected value '%s' of '%s' configuration key. Allowed values: %s.",
74 74
 				$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
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
         $revision = $manifest === NULL ? NULL : self::resolveRevision($manifest, $path, $need, $config);
69 69
 
70 70
         // Is revision only version (query parameter) or full path to asset?
71
-        $isVersion = $revision === NULL || strspn($revision,"./") === 0;
71
+        $isVersion = $revision === NULL || strspn($revision, "./") === 0;
72 72
 
73 73
         // Check if asset exists
74 74
         if ($config['existCheck'] === TRUE) {
75 75
             $ds = DIRECTORY_SEPARATOR;
76 76
             $filePath = $isVersion ? ($wwwDir . $ds . $path) : ($wwwDir . $ds . Utils::normalizePath($revision));
77
-            if (! file_exists($filePath)) {
77
+            if (!file_exists($filePath)) {
78 78
                 $msg = sprintf("Asset '%s' not found.", $filePath);
79 79
                 Utils::throwError(new AssetNotFoundException($msg), $config['missingAsset'], $need);
80 80
                 return '';
@@ -97,12 +97,11 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $revision = $revision ?: 'unknown';
99 99
         $path = $isVersion ?
100
-            sprintf("%s?v=%s", $path, $revision) :
101
-            $revision;
100
+            sprintf("%s?v=%s", $path, $revision) : $revision;
102 101
 
103 102
         return Strings::replace($format,
104 103
             '/%([^%]+)%/',
105
-            function ($matches) use ($basePath, $format, $path, $revision) {
104
+            function($matches) use ($basePath, $format, $path, $revision) {
106 105
                 switch ($matches[1]) {
107 106
                     case 'raw':
108 107
                         return $revision;
@@ -160,7 +159,7 @@  discard block
 block discarded – undo
160 159
 
161 160
         // Path to JSON manifest
162 161
         if (is_string($manifest)) {
163
-            if ( ! file_exists($manifest)) {
162
+            if (!file_exists($manifest)) {
164 163
                 $msg = sprintf("Manifest file not found: '%s'.", $manifest);
165 164
                 Utils::throwError(new ManifestNotFoundException($msg), $config['missingManifest'], $need);
166 165
                 return NULL;
Please login to merge, or discard this patch.