protected function insureSingleEntity($entity, $referencesDefinition, $step)
    {
        $this->insureEntityCountCompatibility($entity, $referencesDefinition, $step);

        if ($entity instanceof AbstractCollection) {
            return reset($entity);
        }

        return $entity;
    }
protected function insureSingleEntity($entity, $referencesDefinition, $step)
    {
        $this->insureEntityCountCompatibility($entity, $referencesDefinition, $step);

        if ($entity instanceof AbstractCollection) {
            return reset($entity);
        }

        return $entity;
    }
protected function insureSingleEntity ( $ entity , $ referencesDefinition , $ step ) { $ this -> insureEntityCountCompatibility ( $ entity , $ referencesDefinition , $ step ) ; if ( $ entity instanceof AbstractCollection ) { return reset ( $ entity ) ; } return $ entity ; }
Verifies compatibility between the definition of the refences to be set and the data set to extarct them from,
and returns a single entity

@param AbstractCollection|mixed $entity
@param array $referencesDefinition
@param MigrationStep $step
@return AbstractCollection|mixed
@deprecated
Verifies compatibility between the definition of the refences to be set and the data set to extarct them from and returns a single entity