AbstractMutationError   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 31
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getErrorMessage() 0 4 1
A getErrorMessageParams() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\ResponseRecorder\Application\ResponseRecorder\MutationResponse\ErrorCollection;
4
5
abstract class AbstractMutationError implements ShowableMutationError
6
{
7
	/** @var string */
8
	protected $errorMessage;
9
10
	/** @var array|mixed[] */
11
	protected $errorMessageParams;
12
13
	/**
14
	 * @param string        $errorMessage
15
	 * @param array|mixed[] $errorMessageParams
16
	 */
17 6
	protected function __construct(string $errorMessage, array $errorMessageParams = [])
18
	{
19 6
		$this->errorMessage = $errorMessage;
20 6
		$this->errorMessageParams = $errorMessageParams;
21 6
	}
22
23 5
	public function getErrorMessage(): string
24
	{
25 5
		return $this->errorMessage;
26
	}
27
28
	/**
29
	 * @return array|mixed[]
30
	 */
31 3
	public function getErrorMessageParams(): array
32
	{
33 3
		return $this->errorMessageParams;
34
	}
35
}
36