TestAggregateCreated::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\SymfonyProoph\Tests\EventSourcing\FakeImplementations;
4
5
use Prooph\EventSourcing\AggregateChanged;
6
use Prooph\ServiceBus\Async\AsyncMessage;
7
use Ramsey\Uuid\UuidInterface;
8
9
class TestAggregateCreated extends AggregateChanged implements AsyncMessage
10
{
11
	private const TEST_PAYLOAD_KEY = 'key';
12
	private const TEST_PAYLOAD_VALUE = 'value';
13
	public const TEST_PAYLOAD = [
14
		self::TEST_PAYLOAD_KEY => self::TEST_PAYLOAD_VALUE,
15
	];
16
17
	public static function create(UuidInterface $uuid): AggregateChanged
18
	{
19
		return self::occur(
20
			$uuid->toString(),
21
			self::TEST_PAYLOAD
22
		);
23
	}
24
}
25