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.

DefaultTransition   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 50
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCurrentState() 0 4 1
A getInput() 0 4 1
A getNextState() 0 4 1
1
<?php
2
3
declare (strict_types = 1);
4
5
namespace Noodle\Transition;
6
7
use Noodle\State\State;
8
use Noodle\Transition\Input\Input;
9
10
final class DefaultTransition implements CreateableFromPattern, Transition
11
{
12
    use CreatesFromPattern;
13
14
    /**
15
     * @var State
16
     */
17
    private $currentState;
18
19
    /**
20
     * @var Input
21
     */
22
    private $input;
23
24
    /**
25
     * @var State
26
     */
27
    private $nextState;
28
29 16
    public function __construct(State $currentState, Input $input, State $nextState)
30
    {
31 16
        $this->currentState = $currentState;
32 16
        $this->input = $input;
33 16
        $this->nextState = $nextState;
34 16
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 16
    public function getCurrentState() : State
40
    {
41 16
        return $this->currentState;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 16
    public function getInput() : Input
48
    {
49 16
        return $this->input;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 16
    public function getNextState() : State
56
    {
57 16
        return $this->nextState;
58
    }
59
}
60