TestAggregateRoot   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 2
A aggregateId() 0 4 1
A apply() 0 3 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