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.

InvalidInputForState::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
crap 1
1
<?php
2
3
declare (strict_types = 1);
4
5
namespace Noodle\Transition\Table\Exception;
6
7
use Noodle\State\State;
8
use Noodle\Statemachine\Exception;
9
use Noodle\Transition\Input\Input;
10
11
class InvalidInputForState extends Exception
12
{
13
    /**
14
     * @var Input
15
     */
16
    private $input;
17
18
    /**
19
     * @var State
20
     */
21
    private $state;
22
23
    /**
24
     * Prepares exception message that includes the invalid input and state
25
     *
26
     * @param Input $input
27
     * @param State $state
28
     */
29 2
    public function __construct(Input $input, State $state)
30
    {
31 2
        $this->input = $input;
32 2
        $this->state = $state;
33
34 2
        parent::__construct(sprintf('Cannot %s a %s object', $input->getName(), $state->getName()));
35 2
    }
36
37
    /**
38
     * Returns the input that was attempted.
39
     *
40
     * @return Input
41
     */
42 1
    public function getInput() : Input
43
    {
44 1
        return $this->input;
45
    }
46
47
    /**
48
     * Returns what the object's current state was.
49
     *
50
     * @return State
51
     */
52 1
    public function getState() : State
53
    {
54 1
        return $this->state;
55
    }
56
}
57