Passed
Push — master ( 04aa1f...4b45e8 )
by Koldo
02:50
created

QueueEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 1
b 0
f 1
dl 0
loc 15
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A occur() 0 6 1
A payload() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Queue\Event;
6
7
abstract class QueueEvent
8
{
9
    protected array $payload;
10
11 4
    public static function occur(array $payload): self
12
    {
13 4
        $self = new static();
14 4
        $self->payload = $payload;
15
16 4
        return $self;
17
    }
18
19
    public function payload(): array
20
    {
21
        return $this->payload;
22
    }
23
}
24