/** * {@inheritdoc} */ public function execute() { // sanity check if (!$this->typeDescriptor->isLoaded()) { return; } // never fails with the check before $this->containingPackage = $this->typeDescriptor->getContainingPackage(); $typeName = $this->typeDescriptor->getTypeName(); $packageName = $this->containingPackage->getName(); // never fails with the check before $this->typeDescriptor->unload(); if ($this->typeDescriptors->contains($typeName, $packageName) && $this->typeDescriptor === $this->typeDescriptors->get($typeName, $packageName)) { // never fails $this->typeDescriptors->remove($typeName, $packageName); $this->wasRemoved = true; } }