Skip to content

Commit 82ede04

Browse files
committed
Update DeepCopySerializer.php
1 parent e55b865 commit 82ede04

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/DeepCopySerializer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ class DeepCopySerializer extends Serializer
2525
protected function serializeObject($value)
2626
{
2727
if ($this->objectStorage->contains($value)) {
28-
return [self::CLASS_IDENTIFIER_KEY => $this->objectStorage[$value]];
28+
return $this->objectStorage[$value];
2929
}
3030

31-
$this->objectStorage->attach($value, $this->objectMappingIndex++);
32-
3331
$reflection = new ReflectionClass($value);
3432
$className = $reflection->getName();
3533

@@ -39,4 +37,4 @@ protected function serializeObject($value)
3937
return $serialized;
4038
}
4139

42-
}
40+
}

0 commit comments

Comments
 (0)