State::brake()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Tleckie\DesignPatterns\State;
4
5
use Exception;
6
7
/**
8
 * Class State
9
 *
10
 * @package Tleckie\DesignPatterns\State
11
 * @author  Teodoro Leckie Westberg <[email protected]>
12
 */
13
class State implements CarState
14
{
15
    /**
16
     * @return SpeedUpState
17
     * @throws Exception
18
     */
19
    public function speedUp(): SpeedUpState
20
    {
21
        throw new Exception();
22
    }
23
24
    /**
25
     * @return BrakeState
26
     * @throws Exception
27
     */
28
    public function brake(): BrakeState
29
    {
30
        throw new Exception();
31
    }
32
33
    /**
34
     * @return OffState
35
     * @throws Exception
36
     */
37
    public function turnOff(): OffState
38
    {
39
        throw new Exception();
40
    }
41
42
    /**
43
     * @return OnState
44
     * @throws Exception
45
     */
46
    public function turnOn(): OnState
47
    {
48
        throw new Exception();
49
    }
50
}
51