Skip to content

Commit

Permalink
Update DeepCopySerializer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed Aug 28, 2015
1 parent e55b865 commit 82ede04
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/DeepCopySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -39,4 +37,4 @@ protected function serializeObject($value)
return $serialized;
}

}
}

0 comments on commit 82ede04

Please sign in to comment.