コード例 #1
0
 public function interact(QuestionsSet $questions)
 {
     $format = $questions->communicate('doc_format', Question::choice('Documentation format', ['rst', 'markdown', 'none']));
     if ('rst' === $format) {
         $questions->communicate('rst_short_name', Question::ask('Short product name', function (array $config) {
             return StringUtil::shortProductName($config['name']);
         }));
     }
 }
コード例 #2
0
 public function interact(QuestionsSet $questions)
 {
     $questions->communicate('enable_phpunit', Question::confirm('Enable PHPUnit?', true));
     if ($questions->communicate('enable_phpspec', Question::confirm('Enable PHPSpec?', false))) {
         $questions->communicate('phpspec_suite_name', Question::confirm('PHPSpec suite-name', function (array $values) {
             return isset($values['name']) ? StringUtil::shortProductName($values['name']) : null;
         }));
     } else {
         $questions->set('phpspec_shortname', null);
     }
     if ($questions->communicate('enable_behat', Question::confirm('Enable Behat?', false))) {
         $questions->communicate('behat_suite_name', Question::ask('Behat suite-name', function (array $values) {
             return isset($values['name']) ? StringUtil::shortProductName($values['name']) : null;
         }));
     } else {
         $questions->set('behat_shortname', null);
     }
     $questions->communicate('enable_mink', Question::confirm('Enable Mink?', false));
 }