AbstractEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 25
rs 10
ccs 5
cts 5
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isPropagationStopped() 0 4 1
A stopPropagation() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Event;
4
5
use Venta\Contracts\Event\Event as EventContract;
6
7
/**
8
 * Class AbstractEvent
9
 *
10
 * @package Venta\Event
11
 */
12
abstract class AbstractEvent implements EventContract
13
{
14
    /**
15
     * Propagation stop flag.
16
     *
17
     * @var bool
18
     */
19
    private $propagationStop = false;
20
21
    /**
22
     * @inheritDoc
23
     */
24 3
    public function isPropagationStopped(): bool
25
    {
26 3
        return $this->propagationStop;
27
    }
28
29
    /**
30
     * @inheritDoc
31
     */
32 2
    public function stopPropagation()
33
    {
34 2
        $this->propagationStop = true;
35
    }
36
}