TestDomainEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setPayload() 0 4 1
A payload() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\ResponseRecorder\Tests\FakeImplementations;
4
5
use Prooph\Common\Messaging\DomainEvent;
6
7
class TestDomainEvent extends DomainEvent
8
{
9
	/** @var array */
10
	private $payload;
11
12
	public function __construct(array $payload)
13
	{
14
		$this->init();
15
		$this->payload = $payload;
16
	}
17
18
	protected function setPayload(array $payload): void
19
	{
20
		$this->payload = $payload;
21
	}
22
23
	public function payload(): array
24
	{
25
		return $this->payload;
26
	}
27
}
28