/**
  * {@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 execute()
 {
     $repositoryPath = $this->mapping->getRepositoryPath();
     if ($this->rootPackageFile->hasPathMapping($repositoryPath)) {
         $this->previousMapping = $this->rootPackageFile->getPathMapping($repositoryPath);
     }
     $this->rootPackageFile->addPathMapping($this->mapping);
 }