Completed
Push — master ( b9492e...31cd44 )
by Alexander
11:15
created

StoppableEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isPropagationStopped() 0 4 1
A stopPropagation() 0 4 1
1
<?php
2
namespace Yiisoft\EventDispatcher\Tests\Event;
3
4
use Psr\EventDispatcher\StoppableEventInterface;
5
6
class StoppableEvent extends Event implements StoppableEventInterface
7
{
8
    private $isPropagationStopped = false;
9
10
    public function isPropagationStopped(): bool
11
    {
12
        return $this->isPropagationStopped;
13
    }
14
15
    public function stopPropagation()
16
    {
17
        $this->isPropagationStopped = true;
18
    }
19
}
20