BasicMutationResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 10 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\ResponseRecorder\Application\ResponseRecorder;
4
5
use TomCizek\ResponseRecorder\Application\ResponseRecorder\MutationResponse\DomainEventCollection;
6
use TomCizek\ResponseRecorder\Application\ResponseRecorder\MutationResponse\MutationErrorCollection;
7
8
final class BasicMutationResponse extends AbstractMutationResponse
9
{
10 9
	private function __construct()
11
	{
12 9
	}
13
14 9
	public static function create(
15
		DomainEventCollection $aggregateChangedEvents,
16
		MutationErrorCollection $errors
17
	): BasicMutationResponse {
18 9
		$instance = new self();
19 9
		$instance->domainEvents = $aggregateChangedEvents;
20 9
		$instance->errors = $errors;
21
22 9
		return $instance;
23
	}
24
}
25