From 40bae067585b56ddeebb46fd25704f9bc4fc917c Mon Sep 17 00:00:00 2001 From: Dmitrii Fediuk Date: Thu, 6 Jun 2024 00:05:05 +0100 Subject: [PATCH] https://github.com/mage2pro/core/issues/379 --- Fonts.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fonts.php b/Fonts.php index 6a7ff66..84cc7d5 100644 --- a/Fonts.php +++ b/Fonts.php @@ -50,7 +50,8 @@ private function items():array {return dfc($this, function():array { */ private function responseA():array {return dfc($this, function():array { $debug = true; /** @var bool $debug */ /** @var string $k */ - list($url, $query) = $debug || !($k = S::s()->serverApiKey()) + # 2024-06-06 "Use the «Symmetric array destructuring» PHP 7.1 feature": https://github.com/mage2pro/core/issues/379 + [$url, $query] = $debug || !($k = S::s()->serverApiKey()) ? ['https://mage2.pro/google-fonts.json', []] : ['https://www.googleapis.com/webfonts/v1/webfonts', ['key' => $k, 'sort' => 'alpha']] ;