code: public function setRepository(RepositoryInterface $repository)
      {
          if ($this->repository && $repository !== $this->repository) {
              throw new \LogicException('A package can only be added to one repository');
          }
          $this->repository = $repository;
      }
docs: {@inheritDoc}