Adapter/RepositoryContentAdapter.php
public function findByTypeAndId($spaceId, $type, $id)
    {
        switch ($type) {
            case ContentfulContentAdapter::CONTENT_TYPE_ASSET:
                $assetOptional = $this->assetRepo->findNewestById($spaceId, $id);
                if ($assetOptional->isDefined()) {
                    /** @var ContentfulAsset $asset */
                    $asset = $assetOptional->get();
                    $files = $asset->file;
                    foreach ($files as $locale => $file) {
                        $files[$locale]['url'] = $this->assetAdapter->getRoute($asset, $locale);
                    }
                    $asset->file = $files;
                }
                return $assetOptional;
            case ContentfulContentAdapter::CONTENT_TYPE_ENTRY:
                return $this->entryRepo->findNewestById($spaceId, $id);
            default:
                throw new InvalidArgumentException(
                    sprintf(
                        'Unknown type: "%s"!',
                        $type
                    )
                );
        }
    }
public function findByTypeAndId($spaceId, $type, $id)
    {
        switch ($type) {
            case ContentfulContentAdapter::CONTENT_TYPE_ASSET:
                $assetOptional = $this->assetRepo->findNewestById($spaceId, $id);
                if ($assetOptional->isDefined()) {
                    /** @var ContentfulAsset $asset */
                    $asset = $assetOptional->get();
                    $files = $asset->file;
                    foreach ($files as $locale => $file) {
                        $files[$locale]['url'] = $this->assetAdapter->getRoute($asset, $locale);
                    }
                    $asset->file = $files;
                }
                return $assetOptional;
            case ContentfulContentAdapter::CONTENT_TYPE_ENTRY:
                return $this->entryRepo->findNewestById($spaceId, $id);
            default:
                throw new InvalidArgumentException(
                    sprintf(
                        'Unknown type: "%s"!',
                        $type
                    )
                );
        }
    }
@param string $spaceId
@param string $type
@param string $id

@return Option
@throws InvalidArgumentException If type is unknown.