code: public function hasPackage(PackageInterface $package)
      {
          $packageId = $package->getUniqueName();
  
          foreach ($this->getPackages() as $repoPackage) {
              if ($packageId === $repoPackage->getUniqueName()) {
                  return true;
              }
          }
  
          return false;
      }
docs: {@inheritDoc}