@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | $cacheData .= sprintf(" '%s' => array(%s", addslashes($family), PHP_EOL); |
98 | 98 | foreach ($variants as $variant => $path) { |
99 | 99 | $path = sprintf("'%s'", $path); |
100 | - $path = str_replace('\'' . $this->getOptions()->getFontDir() , '$fontDir . \'' , $path); |
|
101 | - $path = str_replace('\'' . $this->getOptions()->getRootDir() , '$rootDir . \'' , $path); |
|
100 | + $path = str_replace('\'' . $this->getOptions()->getFontDir(), '$fontDir . \'', $path); |
|
101 | + $path = str_replace('\'' . $this->getOptions()->getRootDir(), '$rootDir . \'', $path); |
|
102 | 102 | $cacheData .= sprintf(" '%s' => %s,%s", $variant, $path, PHP_EOL); |
103 | 103 | } |
104 | 104 | $cacheData .= sprintf(" ),%s", PHP_EOL); |
@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | $localFile = $fontDir . DIRECTORY_SEPARATOR . md5($remoteFile); |
183 | 183 | $localTempFile = $this->options->get('tempDir') . "/" . md5($remoteFile); |
184 | 184 | $cacheEntry = $localFile; |
185 | - $localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH),PATHINFO_EXTENSION)); |
|
185 | + $localFile .= "." . strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION)); |
|
186 | 186 | |
187 | 187 | $styleString = $this->getType("{$style['weight']} {$style['style']}"); |
188 | 188 | |
189 | - if ( !isset($entry[$styleString]) ) { |
|
189 | + if (!isset($entry[$styleString])) { |
|
190 | 190 | $entry[$styleString] = $cacheEntry; |
191 | 191 | |
192 | 192 | // Download the remote file |
@@ -209,14 +209,14 @@ discard block |
||
209 | 209 | |
210 | 210 | unlink($localTempFile); |
211 | 211 | |
212 | - if ( !file_exists("$cacheEntry.ufm") ) { |
|
212 | + if (!file_exists("$cacheEntry.ufm")) { |
|
213 | 213 | return false; |
214 | 214 | } |
215 | 215 | |
216 | 216 | // Save the changes |
217 | 217 | file_put_contents($localFile, $remoteFileContent); |
218 | 218 | |
219 | - if ( !file_exists($localFile) ) { |
|
219 | + if (!file_exists($localFile)) { |
|
220 | 220 | unlink("$cacheEntry.ufm"); |
221 | 221 | return false; |
222 | 222 | } |