Completed
Push — master ( fc63d4...58d04b )
by Yohan
06:35 queued 04:20
created

StateMachineEvent::getStateMachine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Finite\Event;
4
5
use Finite\StateMachine\StateMachine;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * The event object which is thrown on state machine actions
10
 *
11
 * @author Yohan Giarelli <[email protected]>
12
 */
13
class StateMachineEvent extends Event
14
{
15
    /**
16
     * @var StateMachine
17
     */
18
    protected $stateMachine;
19
20
    /**
21
     * @param StateMachine $stateMachine
22
     */
23 170
    public function __construct(StateMachine $stateMachine)
24
    {
25 170
        $this->stateMachine = $stateMachine;
26 170
    }
27
28
    /**
29
     * @return StateMachine
30
     */
31 20
    public function getStateMachine()
32
    {
33 20
        return $this->stateMachine;
34
    }
35
}
36