Passed
Push — master ( 4b45e8...9cf991 )
by Koldo
02:48
created

QueueEvent::isPropagationStopped()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Queue\Event;
6
7
use Psr\EventDispatcher\StoppableEventInterface;
8
9
abstract class QueueEvent implements StoppableEventInterface
10
{
11
    protected array $payload;
12
13 4
    public static function occur(array $payload): self
14
    {
15 4
        $self = new static();
16 4
        $self->payload = $payload;
17
18 4
        return $self;
19
    }
20
21
    public function payload(): array
22
    {
23
        return $this->payload;
24
    }
25
26
    public function isPropagationStopped(): bool
27
    {
28
        return false;
29
    }
30
}
31