TestAggregateRoot::apply()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
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\EventSourcing\AggregateRoot;
7
use Ramsey\Uuid\Uuid;
8
use Ramsey\Uuid\UuidInterface;
9
10
class TestAggregateRoot extends AggregateRoot
11
{
12
	public static function create(UuidInterface $uuid = null)
13
	{
14
		$uuid = $uuid ?: Uuid::uuid4();
15
		$instance = new self();
16
		$instance->recordThat(TestAggregateCreated::create($uuid));
17
18
		return $instance;
19
	}
20
21
	protected function aggregateId(): string
22
	{
23
		return 'fake';
24
	}
25
26
	protected function apply(AggregateChanged $event): void
27
	{
28
	}
29
}
30