/**
  * Transforms the array in an object
  *
  * @param array $item
  *
  * @return object
  */
 protected function transform($item)
 {
     return $this->transformer->transform($this->class, $item);
 }
 /**
  * Transforms a nested entity
  *
  * @param string $class
  * @param string $propertyPath
  * @param string $nestedClass
  * @param array  $data
  *
  * @return object
  */
 protected function transformNestedEntity($class, $propertyPath, $nestedClass, array $data)
 {
     $entity = $this->transformerRegistry->transform($nestedClass, $data);
     $this->addNestedErrors($class, $propertyPath, $nestedClass);
     return $entity;
 }