Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fbc4c34

Browse filesBrowse files
committed
[VarDumper] Remove unused code
1 parent ed7dba6 commit fbc4c34
Copy full SHA for fbc4c34

File tree

1 file changed

+1
-7
lines changed
Filter options

1 file changed

+1
-7
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Cloner/VarCloner.php
+1-7Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.