public function unregisterPlugin(SupervisorInterface $supervisor) { if ($this->registered) { $this->unregister($supervisor); $this->registered = false; } return $this; }