Completed
Pull Request — master (#19)
by Flo
02:55
created

AbstractEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCurrentInstance() 0 4 1
1
<?php
2
3
namespace Faulancer\Event;
4
5
/**
6
 * Class AbstractEvent
7
 * @package Faulancer\Event
8
 * @author  Florian Knapp <[email protected]>
9
 */
10
abstract class AbstractEvent
11
{
12
13
    const NAME = '';
14
15
    /** @var \stdClass */
16
    protected $currentInstance;
17
18
    /**
19
     * AbstractEventType constructor.
20
     *
21
     * @param $currentInstance
22
     */
23
    public function __construct($currentInstance)
24
    {
25
        $this->currentInstance = $currentInstance;
26
    }
27
28
    /**
29
     * @return \stdClass
30
     */
31
    public function getCurrentInstance()
32
    {
33
        return $this->currentInstance;
34
    }
35
36
}