@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | if ($config['existCheck'] === TRUE) { |
| 77 | 77 | $ds = DIRECTORY_SEPARATOR; |
| 78 | 78 | $filePath = $isVersion ? ($wwwDir . $ds . $path) : ($wwwDir . $ds . Utils::normalizePath($revision)); |
| 79 | - if ( ! file_exists($filePath)) { |
|
| 79 | + if (!file_exists($filePath)) { |
|
| 80 | 80 | $msg = sprintf("Asset '%s' not found.", $filePath); |
| 81 | 81 | Utils::throwError(new AssetNotFoundException($msg), $config['missingAsset'], $need); |
| 82 | 82 | return ''; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | return Strings::replace($format, |
| 105 | 105 | '/%([^%]+)%/', |
| 106 | - function ($matches) use ($basePath, $format, $path, $revision, $isVersion) { |
|
| 106 | + function($matches) use ($basePath, $format, $path, $revision, $isVersion) { |
|
| 107 | 107 | switch ($matches[1]) { |
| 108 | 108 | case 'raw': |
| 109 | 109 | return $revision; |
@@ -113,8 +113,7 @@ discard block |
||
| 113 | 113 | return $path; |
| 114 | 114 | case 'url': |
| 115 | 115 | return $isVersion ? |
| 116 | - sprintf("%s/%s?v=%s", $basePath, $path, $revision) : |
|
| 117 | - sprintf("%s/%s", $basePath, $path); |
|
| 116 | + sprintf("%s/%s?v=%s", $basePath, $path, $revision) : sprintf("%s/%s", $basePath, $path); |
|
| 118 | 117 | default: |
| 119 | 118 | $msg = sprintf( |
| 120 | 119 | "Asset macro: Invalid variable '%s' in format '%s'. " . |
@@ -166,7 +165,7 @@ discard block |
||
| 166 | 165 | |
| 167 | 166 | // Path to JSON manifest |
| 168 | 167 | if (is_string($manifest)) { |
| 169 | - if ( ! file_exists($manifest)) { |
|
| 168 | + if (!file_exists($manifest)) { |
|
| 170 | 169 | $msg = sprintf("Manifest file not found: '%s'.", $manifest); |
| 171 | 170 | Utils::throwError(new ManifestNotFoundException($msg), $config['missingManifest'], $need); |
| 172 | 171 | 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], |