diff --git a/src/DeepCopySerializer.php b/src/DeepCopySerializer.php index eba2783..d2e6f1c 100644 --- a/src/DeepCopySerializer.php +++ b/src/DeepCopySerializer.php @@ -25,11 +25,9 @@ class DeepCopySerializer extends Serializer protected function serializeObject($value) { if ($this->objectStorage->contains($value)) { - return [self::CLASS_IDENTIFIER_KEY => $this->objectStorage[$value]]; + return $this->objectStorage[$value]; } - $this->objectStorage->attach($value, $this->objectMappingIndex++); - $reflection = new ReflectionClass($value); $className = $reflection->getName(); @@ -39,4 +37,4 @@ protected function serializeObject($value) return $serialized; } -} \ No newline at end of file +}