UnauthenticatedMenu::getChoices()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace BarenoteCli\Command\Menu;
3
4
use BarenoteCli\Command\Login;
5
6
class UnauthenticatedMenu extends Menu
7
{
8
    const KEY = 'barenote:prelogin:menu';
9
10
    /**
11
     * @return string
12
     */
13
    protected function getQuestion()
14
    {
15
        return 'Do you want to login?';
16
    }
17
    
18
    /**
19
     * @return Choice[]
20
     */
21
    protected function getChoices()
22
    {
23
        return [
24
            new Choice(Login::KEY, 'Sure, login me'),
25
            new Choice(null, 'Actually no, exit this app'),
26
        ];
27
    }
28
}