Failed Conditions
Push — master ( 6fca32...0b1cfb )
by Michał
02:10
created

UnauthenticatedMenu   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSlug() 0 4 1
A getQuestion() 0 4 1
A getChoices() 0 7 1
1
<?php
2
namespace BarenoteCli\Command\Menu;
3
4
class UnauthenticatedMenu extends Menu
5
{
6
    
7
    /**
8
     * @return string
9
     */
10
    protected function getSlug()
11
    {
12
        return 'prelogin';
13
    }
14
    
15
    /**
16
     * @return string
17
     */
18
    protected function getQuestion()
19
    {
20
        return 'Do you want to login?';
21
    }
22
    
23
    /**
24
     * @return Choice[]
25
     */
26
    protected function getChoices()
27
    {
28
        return [
29
            new Choice('barenote:login', 'Sure, login me'),
30
            new Choice(null, 'Actually no, exit this app'),
31
        ];
32
    }
33
}