AbstractEvent::isPropagationStopped()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 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
}