Completed
Push — master ( 5b425e...08c9ff )
by Jared
01:46
created

AbstractEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getModel() 0 4 1
1
<?php
2
3
/**
4
 * @author Jared King <[email protected]>
5
 *
6
 * @see http://jaredtking.com
7
 *
8
 * @copyright 2015 Jared King
9
 * @license MIT
10
 */
11
12
namespace Pulsar\Event;
13
14
use Pulsar\Model;
15
use Symfony\Contracts\EventDispatcher\Event;
16
17
abstract class AbstractEvent extends Event
18
{
19
    /**
20
     * @var Model
21
     */
22
    protected $model;
23
24
    public function __construct(Model $model)
25
    {
26
        $this->model = $model;
27
    }
28
29
    /**
30
     * Gets the model for this event.
31
     */
32
    public function getModel(): Model
33
    {
34
        return $this->model;
35
    }
36
}
37