Пример #1
0
 /**
  * Configure the options
  *
  * @return array
  */
 protected function configureVariables()
 {
     foreach (get_class_methods($this) as $method) {
         if (substr($method, 0, 5) === 'check' && $method[5] === strtoupper($method[5])) {
             $check = substr($method, 5);
             $this->checks[] = $check;
             if (method_exists($this, 'fix' . $check)) {
                 $this->fixes[] = $check;
             }
         }
     }
     return array('check' => array('type' => 'array', 'option' => true, 'label' => 'Only execute these checks - available checks are ' . implode(', ', $this->checks)), 'fix' => array('type' => 'boolean|array', 'option' => true, 'label' => 'Enable fixes and optionally reduce to certain fixes - available fixes are ' . implode(', ', $this->fixes))) + parent::configureVariables();
 }
Пример #2
0
 /**
  * Configures the arguments/options
  *
  * @return array
  */
 protected function configureVariables()
 {
     return array('branch' => array('type' => 'string', 'label' => 'The branch to merge in', 'argument' => true, 'required' => true), 'squash' => array('type' => 'bool', 'label' => 'Whether to merge with --squash', 'option' => true), 'delete' => array('type' => 'bool', 'label' => 'Whether to delete the branch after merge', 'option' => true), 'message' => array('type' => 'bool', 'label' => 'Message for commits (if any)', 'option' => true, 'shortcut' => 'm'), 'no-diagnose' => array('type' => 'bool', 'label' => 'Don\'t do a diagnose upfront', 'option' => true), '--') + parent::configureVariables();
 }
Пример #3
0
 /**
  * Configures the arguments/options
  *
  * @return array
  */
 protected function configureVariables()
 {
     return array('branch' => array('type' => 'string|array', 'label' => 'The branch(es) to check out (fallback is always master)', 'argument' => true, 'required' => true), 'merge' => array('type' => 'bool', 'label' => 'Whether to merge the checked out branch with the previously checked out branch', 'option' => true, 'shortcut' => 'm'), 'create' => array('type' => 'bool', 'label' => 'Create branch if not exists', 'option' => true, 'shortcut' => 'c'), '--') + parent::configureVariables();
 }