Skip to content

Commit

Permalink
Removed ValueProcessorContainer from ObjectMapper setFields
Browse files Browse the repository at this point in the history
  • Loading branch information
grohman committed Sep 11, 2017
1 parent 42763b9 commit 19341a0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Objection/Mapper/ObjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,10 @@ private static function getFields(LiteObject $object, IValuesProcessorContainer
/**
* @param LiteObject $object
* @param array $data
* @param IValuesProcessorContainer $container
* @return LiteObject
*/
private static function setFields(LiteObject $object, $data, IValuesProcessorContainer $container)
private static function setFields(LiteObject $object, $data)
{
$className = get_class($object);

if ($container->has($className))
{
$data = $container->get($className)->toObjectValues($data);
}

if ($object instanceof IMappedObject)
{
$object->setObjectData($data);
Expand Down Expand Up @@ -146,7 +138,7 @@ private static function getObjectFromData(LiteObject $object,

$data = $processor->postMapProcess($className, $data);

return self::setFields($object, $data, $container);
return self::setFields($object, $data);
}

private static function getDataFromLiteObject(IMapperCollection $collection,
Expand Down

0 comments on commit 19341a0

Please sign in to comment.