GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ChooseTask::createQuestion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * See class comment
4
 *
5
 * PHP Version 5
6
 *
7
 * @category   Netresearch
8
 * @package    Netresearch\Kite
9
 * @subpackage Task
10
 * @author     Christian Opitz <[email protected]>
11
 * @license    http://www.netresearch.de Netresearch Copyright
12
 * @link       http://www.netresearch.de
13
 */
14
15
namespace Netresearch\Kite\Task;
16
use Symfony\Component\Console\Question\ChoiceQuestion;
17
18
/**
19
 * Ask a selection question and return the answer
20
 *
21
 * @category   Netresearch
22
 * @package    Netresearch\Kite
23
 * @subpackage Task
24
 * @author     Christian Opitz <[email protected]>
25
 * @license    http://www.netresearch.de Netresearch Copyright
26
 * @link       http://www.netresearch.de
27
 */
28
class ChooseTask extends AnswerTask
29
{
30
    /**
31
     * Configure the options
32
     *
33
     * @return array
34
     */
35
    protected function configureVariables()
36
    {
37
        return array(
38
            'choices' => array(
39
                'type' => 'array',
40
                'required' => true,
41
                'label' => 'The choices, the user can choose from'
42
            ),
43
            '--'
44
        ) + parent::configureVariables();
45
    }
46
47
    /**
48
     * Create the question
49
     *
50
     * @param string $question The question
51
     * @param mixed  $default  Default value
52
     *
53
     * @return ChoiceQuestion
54
     */
55
    protected function createQuestion($question, $default)
56
    {
57
        return new ChoiceQuestion($this->formatQuestion($question, $default), $this->get('choices'), $default);
58
    }
59
}
60
?>
61