/** * {@inheritdoc} */ public function execute() { if (!$this->rootPackageFile->hasBindingDescriptor($this->uuid)) { return; } $this->previousDescriptor = $this->rootPackageFile->getBindingDescriptor($this->uuid); $this->rootPackageFile->removeBindingDescriptor($this->uuid); }
/** * {@inheritdoc} */ public function rollback() { if ($this->previousDescriptor) { $this->rootPackageFile->addBindingDescriptor($this->previousDescriptor); } else { $this->rootPackageFile->removeBindingDescriptor($this->bindingDescriptor->getUuid()); } }