code: protected function getContentTypes($spaceId)
      {
          $ctypes = new ArrayCollection();
          foreach ($this->contentTypeRepo->findAllBySpaceId($spaceId) as $c) {
              $ctypes->set($c->getId(), $c);
          }
          return $ctypes;
      }
docs: @param string $spaceId
  
  @return ArrayCollection|ContentfulContentType[]