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

StateMachineEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
cbo 1
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getStateMachine() 0 4 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