From fbc4c3420223111ec15a61be4a0f604a1afd3de2 Mon Sep 17 00:00:00 2001 From: wkania Date: Sun, 27 Apr 2025 20:39:23 +0200 Subject: [PATCH] [VarDumper] Remove unused code --- src/Symfony/Component/VarDumper/Cloner/VarCloner.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 170c8b40aada3..6a7ec2826cb7f 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -28,14 +28,12 @@ protected function doClone(mixed $var): array $objRefs = []; // Map of original object handles to their stub object counterpart $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning $resRefs = []; // Map of original resource handles to their stub object counterpart - $values = []; // Map of stub objects' ids to original values $maxItems = $this->maxItems; $maxString = $this->maxString; $minDepth = $this->minDepth; $currentDepth = 0; // Current tree depth $currentDepthFinalIndex = 0; // Final $queue index for current tree depth $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references $a = null; // Array cast for nested structures $stub = null; // Stub capturing the main properties of an original item value // or null if the original value is used directly @@ -53,7 +51,7 @@ protected function doClone(mixed $var): array } } - $refs = $vals = $queue[$i]; + $vals = $queue[$i]; foreach ($vals as $k => $v) { // $v is the original value or a stub object in case of hard references @@ -215,10 +213,6 @@ protected function doClone(mixed $var): array $queue[$i] = $vals; } - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } - return $queue; } }