diff --git a/Font/Variant.php b/Font/Variant.php index 74e45c5..3d20f9f 100644 --- a/Font/Variant.php +++ b/Font/Variant.php @@ -37,17 +37,14 @@ function preview(Params $params = null) { * @used-by \Df\GoogleFont\Font\Variant\Preview * @return string */ - function ttfPath() {return dfc($this, function() { - /** @var string $result */ - if (!file_exists($result = Fs::s()->absolute(['ttf', basename($this->url())]))) { - df_file_write($result, file_get_contents($this->url())); + function ttfPath() {return dfc($this, function() {/** @var string $r */ + $u = $this[self::$P__URL]; /** @var string $u */ + if (!file_exists($r = Fs::s()->absolute(['ttf', basename($u)]))) { + df_file_write($r, file_get_contents($u)); } - return $result; + return $r; });} - /** @return string */ - private function url() {return $this[self::$P__URL];} - /** * 2015-11-29 * @param Font $font diff --git a/composer.json b/composer.json index 983b44a..49c51f0 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/google-font" - ,"version": "1.2.5" + ,"version": "1.2.6" ,"description": "Google Font API." ,"type": "magento2-module" ,"homepage": "https://github.com/mage2pro/google-font" @@ -11,6 +11,6 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=8.1.0", "mage2pro/google": "*"} + ,"require": {"mage2pro/core": ">=8.1.1", "mage2pro/google": "*"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Df\\GoogleFont\\": ""}} } \ No newline at end of file