DefaultFormatter::format()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Protoku\Exceptions\Formatters;
4
5
use Protoku\Exceptions\Interfaces\FormatterInterface;
6
7
class DefaultFormatter implements FormatterInterface
8
{
9
10
	public function format(\Throwable $e): array
11
	{
12
		return [
13
			'message' => $e->getMessage(),
14
			'file' => $e->getFile(),
15
			'line' => $e->getLine(),
16
			'trace' => $e->getTrace(),
17
		];
18
	}
19
}