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

StoppableEvent::stopPropagation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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