/**
  * Execute this command.
  *
  * @return int|void
  */
 protected function doExecute()
 {
     $name = $this->getArgument(0);
     if (!$name) {
         throw new \Exception('Please enter a profile name.');
     }
     $model = new ProfileModel();
     $model->checkout($name);
     $this->out()->out(sprintf('Checked out to profile "%s".', $name));
 }
 /**
  * Execute this command.
  *
  * @return int|void
  */
 protected function doExecute()
 {
     $name = $this->getArgument(0);
     if (!$name) {
         throw new \Exception('Please enter a profile name.');
     }
     $model = new ProfileModel();
     $model->add($name);
     $this->out()->out(sprintf("Profile \"%s\" created.", $name));
     return true;
 }
 /**
  * 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;
 }