Completed
Push — 4.0 ( 38d142...8ab097 )
by Marco
03:25
created

AbstractEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getName() 0 5 1
1
<?php namespace Comodojo\Dispatcher\Events;
2
3
use \Comodojo\Dispatcher\Components\Timestamp as TimestampTrait;
4
use \League\Event\AbstractEvent as LeagueAbstractEvent;
5
6
/**
7
 * @package     Comodojo Dispatcher
8
 * @author      Marco Giovinazzi <[email protected]>
9
 * @author      Marco Castiello <[email protected]>
10
 * @license     GPL-3.0+
11
 *
12
 * LICENSE:
13
 *
14
 * This program is free software: you can redistribute it and/or modify
15
 * it under the terms of the GNU Affero General Public License as
16
 * published by the Free Software Foundation, either version 3 of the
17
 * License, or (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU Affero General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU Affero General Public License
25
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26
 */
27
28
29
abstract class AbstractEvent extends LeagueAbstractEvent {
30
31
    use TimestampTrait;
32
33
    private $name;
34
35 1
    public function __construct($name) {
36
37 1
        $this->setTimestamp();
38
39 1
        $this->name = $name;
40
41 1
    }
42
43 1
    public function getName() {
44
45 1
        return $this->name;
46
47
    }
48
49
}
50