TestDomainEvent::setPayload()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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