src/Utility/DomainEntityBuilder.php
private function getEntityFromModel($index, $propertyName)
    {
        $entity = $this->model[$index];
        if ($entity->getName() === $propertyName) {
            return $entity;
        }
        // TODO Do we need to implement search by name in model?
        throw new RuntimeException("Unexpected $propertyName by the given index.");
    }
private function getEntityFromModel($index, $propertyName)
    {
        $entity = $this->model[$index];
        if ($entity->getName() === $propertyName) {
            return $entity;
        }
        // TODO Do we need to implement search by name in model?
        throw new RuntimeException("Unexpected $propertyName by the given index.");
    }
Returns metadata description of property from model

@param string $index
@param string $propertyName
@return AbstractEntity
@throws RuntimeException