UnauthenticatedMenu   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuestion() 0 4 1
A getChoices() 0 7 1
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
}