/** * Execute this command. * * @throws \Exception * @return int|void */ protected function doExecute() { $name = $this->getArgument(0); if (!$name) { throw new \Exception('Please enter a profile name.'); } if (!$this->getOption('y')) { $prompter = new BooleanPrompter('Do you really want to remove "' . $name . '" profile? [Y/n]: '); if (!$prompter->ask()) { return false; } } $model = new ProfileModel(); $model->remove($name); $this->out()->out(sprintf('Profile "%s" removed.', $name)); return true; }