/**
  * {@inheritdoc}
  */
 public function execute()
 {
     if ($this->rootPackageFile->hasPathMapping($this->repositoryPath)) {
         $this->previousMapping = $this->rootPackageFile->getPathMapping($this->repositoryPath);
         $this->rootPackageFile->removePathMapping($this->repositoryPath);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function rollback()
 {
     if ($this->previousMapping) {
         $this->rootPackageFile->addPathMapping($this->previousMapping);
     } else {
         $this->rootPackageFile->removePathMapping($this->mapping->getRepositoryPath());
     }
 }