Passed
Push — master ( 4da179...4cded1 )
by Yannick
02:33
created

ReadOnlyTransition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Star\Component\State\Transitions;
4
5
use Star\Component\State\RegistryBuilder;
6
use Star\Component\State\StateTransition;
7
use Webmozart\Assert\Assert;
8
9
final class ReadOnlyTransition implements StateTransition
10
{
11
    /**
12
     * @var string
13
     */
14
    private $destination;
15
16
    /**
17
     * @param string $destination
18
     */
19 30
    public function __construct($destination)
20
    {
21 30
        Assert::string($destination);
22 30
        $this->destination = $destination;
23 30
    }
24
25
    public function getName()
26
    {
27
        throw new \RuntimeException('Method ' . __METHOD__ . ' not implemented yet.');
28
    }
29
30
    /**
31
     * @param RegistryBuilder $registry
32
     */
33
    public function onRegister(RegistryBuilder $registry)
34
    {
35
        throw new \RuntimeException('Method ' . __METHOD__ . ' not implemented yet.');
36
    }
37
38
    /**
39
     * @return string
40
     */
41 29
    public function getDestinationState()
42
    {
43 29
        return $this->destination;
44
    }
45
}
46