AbstractShowableTranslatableDomainException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getMessageParameters() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\ResponseRecorder\DomainModel;
4
5
use Exception;
6
use Throwable;
7
8
abstract class AbstractShowableTranslatableDomainException extends Exception implements ShowableTranslatableDomainException
9
{
10
	/** @var array|mixed[] */
11
	protected $messageParameters;
12
13
	/**
14
	 * @param string         $message
15
	 * @param array|mixed[]  $messageParameters
16
	 * @param int            $code
17
	 * @param Throwable|null $previous
18
	 */
19 2
	public function __construct(
20
		string $message = '',
21
		array $messageParameters = [],
22
		int $code = 0,
23
		?Throwable $previous = null
24
	) {
25 2
		parent::__construct($message, $code, $previous);
26 2
		$this->messageParameters = $messageParameters;
27 2
	}
28
29
	/**
30
	 * @return array|mixed[]
31
	 */
32 2
	public function getMessageParameters(): array
33
	{
34 2
		return $this->messageParameters;
35
	}
36
}
37