From 9e613a339a062e117c1190b4455d8ccf2abb8fce Mon Sep 17 00:00:00 2001 From: Dmitrii Fediuk Date: Wed, 5 Jun 2024 23:59:48 +0100 Subject: [PATCH] https://github.com/mage2pro/core/issues/379 --- Framework/Form/Element/Checkbox.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Framework/Form/Element/Checkbox.php b/Framework/Form/Element/Checkbox.php index 5ee1bbbd7..9b4509072 100644 --- a/Framework/Form/Element/Checkbox.php +++ b/Framework/Form/Element/Checkbox.php @@ -84,7 +84,8 @@ function getElementHtml():string { # https://3v4l.org/3O92j # https://php.net/manual/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring # https://stackoverflow.com/a/28233499 - list($before, $after) = + # 2024-06-06 "Use the «Symmetric array destructuring» PHP 7.1 feature": https://github.com/mage2pro/core/issues/379 + [$before, $after] = !($label = $this[self::LABEL]) ? [$this->getBeforeElementHtml(), $this->getAfterElementHtml()] : ( !!$this[self::LABEL_POSITION_BEFORE] ? [$label, ''] : ['', $label] )