Adapter/RepositoryContentAdapter.php
protected function findContentType($spaceId, $contentTypeName)
    {
        $contentTypes = $this->contentTypeRepo->findNewestByName($spaceId, $contentTypeName);
        if ($contentTypes->isEmpty()) {
            throw new InvalidArgumentException(
                sprintf(
                    'Content type "%s" in space "%s" not found!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        if ($contentTypes->count() > 1) {
            throw new InvalidArgumentException(
                sprintf(
                    'Multiple content types with name "%s" found in space "%s"!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        $contentType = $contentTypes->first();
        return $contentType;
    }
protected function findContentType($spaceId, $contentTypeName)
    {
        $contentTypes = $this->contentTypeRepo->findNewestByName($spaceId, $contentTypeName);
        if ($contentTypes->isEmpty()) {
            throw new InvalidArgumentException(
                sprintf(
                    'Content type "%s" in space "%s" not found!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        if ($contentTypes->count() > 1) {
            throw new InvalidArgumentException(
                sprintf(
                    'Multiple content types with name "%s" found in space "%s"!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        $contentType = $contentTypes->first();
        return $contentType;
    }
Finds one content type by it's name.

@param $spaceId
@param $contentTypeName

@return ContentfulContentType
@throws InvalidArgumentException If a content type with the given name cannot be found.
@throws InvalidArgumentException If multiple content type with the name are found.