Code Duplication    Length = 7-8 lines in 4 locations

src/Console/Command.php 4 locations

@@ 190-196 (lines=7) @@
187
     *
188
     * @return mixed
189
     */
190
    public function ask($question, $default = null)
191
    {
192
        $helper = $this->getHelper('question');
193
        $question = new Question($question, $default);
194
195
        return $helper->ask($this->input, $this->getOutputInterface(), $question);
196
    }
197
198
    /**
199
     * Ask a password.
@@ 225-232 (lines=8) @@
222
     *
223
     * @return mixed
224
     */
225
    public function choose($question, array $choices, $default = null)
226
    {
227
        $helper = $this->getHelper('question');
228
        $question = new ChoiceQuestion($question, $choices, $default);
229
        $question->setErrorMessage('%s is not a valid answer.');
230
231
        return $helper->ask($this->input, $this->getOutputInterface(), $question);
232
    }
233
234
    /**
235
     * Ask a question where some auto-completion help is provided.
@@ 243-250 (lines=8) @@
240
     *
241
     * @return mixed
242
     */
243
    public function anticipate($question, array $autoCompletion, $default = null)
244
    {
245
        $helper = $this->getHelper('question');
246
        $question = new Question($question, $default);
247
        $question->setAutocompleterValues($autoCompletion);
248
249
        return $helper->ask($this->input, $this->getOutputInterface(), $question);
250
    }
251
252
    /**
253
     * Ask a question where the answer is available from a list of predefined choices and more choices can be selected.
@@ 261-268 (lines=8) @@
258
     *
259
     * @return mixed
260
     */
261
    public function choice($question, array $choices, $default = null)
262
    {
263
        $helper = $this->getHelper('question');
264
        $question = new ChoiceQuestion($question, $choices, $default);
265
        $question->setMultiselect(true);
266
267
        return $helper->ask($this->input, $this->getOutputInterface(), $question);
268
    }
269
}
270