Completed
Push — master ( 047d33...8be84a )
by Guido
03:34
created

Event   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
1
<?php
2
namespace Gvera\Events;
3
4
/**
5
 * Event Class Doc Comment
6
 *
7
 * @category Class
8
 * @package  src/events
9
 * @author    Guido Vera
10
 * @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
11
 * @link     http://www.github.com/veraguido/gv
12
 *
13
 */
14
abstract class Event
15
{
16
    protected string $id = '';
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
17
    protected bool $stopPropagation = false;
18
19
    public function __construct($id = '')
20
    {
21
        $this->id = $id;
22
    }
23
24
    /**
25
     * @return boolean
26
     */
27
    public function hasStopPropagation(): bool
28
    {
29
        return $this->stopPropagation;
30
    }
31
32
    /**
33
     * @param boolean $stopPropagation
34
     */
35
    public function setStopPropagation(bool $stopPropagation)
36
    {
37
        $this->stopPropagation = $stopPropagation;
38
    }
39
40
    public function getId(): string
41
    {
42
        return $this->id;
43
    }
44
}
45