Passed
Pull Request — master (#19)
by Yannick
02:27
created

TransitionWasSuccessful::transition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the php-state project.
4
 *
5
 * (c) Yannick Voyer <[email protected]> (http://github.com/yvoyer)
6
 */
7
8
namespace Star\Component\State\Event;
9
10
use Symfony\Component\EventDispatcher\Event;
11
use Webmozart\Assert\Assert;
12
13
final class TransitionWasSuccessful extends Event implements StateEvent
14
{
15
    /**
16
     * @var string
17
     */
18
    private $transition;
19
20
    /**
21
     * @param string $transition
22
     */
23 19
    public function __construct($transition)
24
    {
25 19
        Assert::string($transition);
26 19
        $this->transition = $transition;
27 19
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function transition()
33
    {
34
        return $this->transition;
35
    }
36
}
37