@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | $revision = $manifest === NULL ? NULL : self::resolveRevision($manifest, $path, $need, $config); |
70 | 70 | |
71 | 71 | // Is revision only version (query parameter) or full path to asset? |
72 | - $isVersion = $revision === NULL || strspn($revision,"./") === 0; |
|
72 | + $isVersion = $revision === NULL || strspn($revision, "./") === 0; |
|
73 | 73 | |
74 | 74 | // Check if asset exists |
75 | 75 | if ($config['existCheck'] === TRUE) { |
76 | 76 | $ds = DIRECTORY_SEPARATOR; |
77 | 77 | $filePath = $isVersion ? ($wwwDir . $ds . $path) : ($wwwDir . $ds . self::normalizePath($revision)); |
78 | - if (! file_exists($filePath)) { |
|
78 | + if (!file_exists($filePath)) { |
|
79 | 79 | $msg = sprintf("Asset '%s' not found.", $filePath); |
80 | 80 | self::throwError(new AssetNotFoundException($msg), $config['missingAsset'], $need); |
81 | 81 | return ''; |
@@ -98,12 +98,11 @@ discard block |
||
98 | 98 | { |
99 | 99 | $revision = $revision ?: 'unknown'; |
100 | 100 | $path = $isVersion ? |
101 | - sprintf("%s?v=%s", $path, $revision) : |
|
102 | - $revision; |
|
101 | + sprintf("%s?v=%s", $path, $revision) : $revision; |
|
103 | 102 | |
104 | 103 | return Strings::replace($format, |
105 | 104 | '/%([^%]+)%/', |
106 | - function ($matches) use ($basePath, $format, $path, $revision) { |
|
105 | + function($matches) use ($basePath, $format, $path, $revision) { |
|
107 | 106 | switch ($matches[1]) { |
108 | 107 | case 'raw': |
109 | 108 | return $revision; |
@@ -161,7 +160,7 @@ discard block |
||
161 | 160 | |
162 | 161 | // Path to JSON manifest |
163 | 162 | if (is_string($manifest)) { |
164 | - if ( ! file_exists($manifest)) { |
|
163 | + if (!file_exists($manifest)) { |
|
165 | 164 | $msg = sprintf("Manifest file not found: '%s'.", $manifest); |
166 | 165 | self::throwError(new ManifestNotFoundException($msg), $config['missingManifest'], $need); |
167 | 166 | return NULL; |
@@ -31,9 +31,9 @@ discard block |
||
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 |
||
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], |