Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 87.5% |
Changes | 0 |
1 | <?php |
||
9 | final class OneToOneTransition implements StateTransition |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $name; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $from; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $to; |
||
25 | |||
26 | /** |
||
27 | * @param string $name |
||
28 | * @param string $from |
||
29 | * @param string $to |
||
30 | */ |
||
31 | 48 | public function __construct($name, $from, $to) |
|
32 | { |
||
33 | 48 | Assert::string($name); |
|
34 | 48 | Assert::string($from); |
|
35 | 48 | Assert::string($to); |
|
36 | 48 | $this->name = $name; |
|
37 | 48 | $this->from = $from; |
|
38 | 48 | $this->to = $to; |
|
39 | 48 | } |
|
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | 47 | public function getName() |
|
45 | { |
||
46 | 47 | return $this->name; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param RegistryBuilder $registry |
||
51 | */ |
||
52 | 47 | public function onRegister(RegistryBuilder $registry) |
|
56 | 47 | } |
|
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getDestinationState() |
||
64 | } |
||
65 | } |
||
66 |