public function rollback() { if ($this->previousDescriptor) { $this->rootPackageFile->addTypeDescriptor($this->previousDescriptor); } else { $this->rootPackageFile->removeTypeDescriptor($this->typeDescriptor->getName()); } }
/** * {@inheritdoc} */ public function execute() { if (!$this->rootPackageFile->hasTypeDescriptor($this->typeName)) { return; } $this->previousDescriptor = $this->rootPackageFile->getTypeDescriptor($this->typeName); $this->rootPackageFile->removeTypeDescriptor($this->typeName); }