public function setLock(PackageInterface $package, $state)
    {
        if ((bool) $state) {
            return $this->lockPackage($package);
        }

        return $this->unlockPackage($package);
    }