Completed
Push — master ( 1fcaad...bda6d8 )
by WEBEWEB
02:35
created

AbstractEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getEventName() 0 3 1
A setEventName() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the bootstrap-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\BootstrapBundle\Event;
13
14
use Symfony\Component\EventDispatcher\Event;
15
16
/**
17
 * Abstract event.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\BootstrapBundle\Event
21
 * @abstract
22
 */
23
abstract class AbstractEvent extends Event {
24
25
    /**
26
     * Event name.
27
     *
28
     * @var string
29
     */
30
    private $eventName;
31
32
    /**
33
     * Constructor.
34
     *
35
     * @param string $eventName The event name.
36
     */
37
    protected function __construct($eventName) {
38
        $this->setEventName($eventName);
39
    }
40
41
    /**
42
     * Get the event name.
43
     *
44
     * @return string Returns the event name.
45
     */
46
    public function getEventName() {
47
        return $this->eventName;
48
    }
49
50
    /**
51
     * Set the event name.
52
     *
53
     * @param string $eventName The event name.
54
     * @return AbstractBootstrapEvent Returns this Bootstrap event.
55
     */
56
    protected function setEventName($eventName) {
57
        $this->eventName = $eventName;
58
        return $this;
59
    }
60
61
}
62