Liip\RMT\Information\InteractiveQuestion::formatChoices PHP Method

formatChoices() public method

public formatChoices ( $choices, $shortcuts )
    public function formatChoices($choices, $shortcuts)
    {
        if (count($shortcuts) > 0) {
            $shortcuts = array_flip($shortcuts);
            foreach ($shortcuts as $choice => $shortcut) {
                $shortcuts[$choice] = '<info>' . $shortcut . '</info>';
            }
            foreach ($choices as $pos => $choice) {
                $choices[$pos] = '[' . $shortcuts[$choice] . '] ' . $choice;
            }
        }
        $text = '    ' . implode(PHP_EOL . '    ', $choices);
        return $text . "\nYour choice";
    }