original_string: public function choose($question, $choice = 'yn', $default = 'n')
      {
          if (!is_string($choice)) {
              $choice = implode('', $choice);
          }
  
          $lowercase = str_ireplace($default, strtoupper($default), strtolower($choice));
          $choices = trim(implode('/', preg_split('//', $lowercase)), '/');
          $line = $this->prompt(sprintf('%s [%s]', $question, $choices), $default, '');
  
          if (stripos($choice, $line) !== false) {
              return strtolower($line);
          }
  
          return strtolower($default);
      }
code: public function choose($question, $choice = 'yn', $default = 'n')
      {
          if (!is_string($choice)) {
              $choice = implode('', $choice);
          }
  
          $lowercase = str_ireplace($default, strtoupper($default), strtolower($choice));
          $choices = trim(implode('/', preg_split('//', $lowercase)), '/');
          $line = $this->prompt(sprintf('%s [%s]', $question, $choices), $default, '');
  
          if (stripos($choice, $line) !== false) {
              return strtolower($line);
          }
  
          return strtolower($default);
      }
code_tokens: public function choose ( $ question , $ choice = 'yn' , $ default = 'n' ) { if ( ! is_string ( $ choice ) ) { $ choice = implode ( '' , $ choice ) ; } $ lowercase = str_ireplace ( $ default , strtoupper ( $ default ) , strtolower ( $ choice ) ) ; $ choices = trim ( implode ( '/' , preg_split ( '//' , $ lowercase ) ) , '/' ) ; $ line = $ this -> prompt ( sprintf ( '%s [%s]' , $ question , $ choices ) , $ default , '' ) ; if ( stripos ( $ choice , $ line ) !== false ) { return strtolower ( $ line ) ; } return strtolower ( $ default ) ; }
docstring: Presents a user with a multiple choice questions
  @param string $question
  @param string|array $choice
  @param string $default
  @return string
docstring_tokens: Presents a user with a multiple choice questions