From 3534ff76d0769e5fbe916e72213cadbaf378b220 Mon Sep 17 00:00:00 2001 From: Dmitrii Fediuk Date: Thu, 6 Jun 2024 00:03:35 +0100 Subject: [PATCH] https://github.com/mage2pro/core/issues/379 --- Qa/lib/bt/main.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Qa/lib/bt/main.php b/Qa/lib/bt/main.php index 53ab53374..72aa08d3d 100644 --- a/Qa/lib/bt/main.php +++ b/Qa/lib/bt/main.php @@ -18,11 +18,12 @@ function df_bt($p = 0, int $limit = 0):array { debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, !$limit ? 0 : 1 + $p + $limit) ); # 2023-07-27 "Shift the `file` and `line` keys to an entry back in `df_bt()`": https://github.com/mage2pro/core/issues/283 - list($f, $l) = ['', 0]; /** @var string $f */ /** @var int $l */ + # 2024-06-06 "Use the «Symmetric array destructuring» PHP 7.1 feature": https://github.com/mage2pro/core/issues/379 + [$f, $l] = ['', 0]; /** @var string $f */ /** @var int $l */ foreach ($r as &$e) {/** @var array(string => int|string) $e */ - list($f2, $l2) = [df_bt_entry_file($e), df_bt_entry_line($e)]; /** @var string $f2 */ /** @var int $l2 */ + [$f2, $l2] = [df_bt_entry_file($e), df_bt_entry_line($e)]; /** @var string $f2 */ /** @var int $l2 */ $e = ['file' => $f, 'line' => $l] + $e; - list($f, $l) = [$f2, $l2]; + [$f, $l] = [$f2, $l2]; } /** * 2023-07-28 We skip the first entry: `df_bt`.