8000 minor #60287 [VarDumper] Remove unused code (wkania) · symfony/symfony@fc40d62 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc40d62

Browse files
minor #60287 [VarDumper] Remove unused code (wkania)
This PR was merged into the 7.3 branch. Discussion ---------- [VarDumper] Remove unused code | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Not all was removed in the [PR](#52619). I did not remove [objects](#30350). It did look like unused code. Maybe some comment in code needed? Last uses of `Cookie` and `refs` were deleted [here](https://github.com/symfony/symfony/pull/41295/files#diff-27fadd95a89adb229b33890577a4495e15bdbc1b25f12c44f7afa8a12a00d37b). Last use of $[values](ff00f8f#diff-27fadd95a89adb229b33890577a4495e15bdbc1b25f12c44f7afa8a12a00d37bR100). Commits ------- fbc4c34 [VarDumper] Remove unused code
2 parents 27edcc2 + fbc4c34 commit fc40d62

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ protected function doClone(mixed $var): array
2828
$objRefs = []; // Map of original object handles to their stub object counterpart
2929
$objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning
3030
$resRefs = []; // Map of original resource handles to their stub object counterpart
31-
$values = []; // Map of stub objects' ids to original values
3231
$maxItems = $this->maxItems;
3332
$maxString = $this->maxString;
3433
$minDepth = $this->minDepth;
3534
$currentDepth = 0; // Current tree depth
3635
$currentDepthFinalIndex = 0; // Final $queue index for current tree depth
3736
$minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached
38-
$cookie = (object) []; // Unique object used to detect hard references
3937
$a = null; // Array cast for nested structures
4038
$stub = null; // Stub capturing the main properties of an original item value
4139
// or null if the original value is used directly
@@ -53,7 +51,7 @@ protected function doClone(mixed $var): array
5351
}
5452
}
5553

56-
$refs = $vals = $queue[$i];
54+
$vals = $queue[$i];
5755
foreach ($vals as $k => $v) {
5856
// $v is the original value or a stub object in case of hard references
5957

@@ -215,10 +213,6 @@ protected function doClone(mixed $var): array
215213
$queue[$i] = $vals;
216214
}
217215

218-
foreach ($values as $h => $v) {
219-
$hardRefs[$h] = $v;
220-
}
221-
222216
return $queue;
223217
}
224218
}

0 commit comments

Comments
 (0)
0