Passed
Push — master ( 1f3606...8f1bd7 )
by Jan-Marten
02:11
created

ExceptionFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 3 1
1
<?php
2
/**
3
 * Copyright MediaCT. All rights reserved.
4
 * https://www.mediact.nl
5
 */
6
7
namespace Johmanx10\Transaction\Formatter;
8
9
use Throwable;
10
11
class ExceptionFormatter implements ExceptionFormatterInterface
12
{
13
    /**
14
     * Format the given exception into a readable string.
15
     *
16
     * @param Throwable $exception
17
     *
18
     * @return string
19
     */
20 1
    public function format(Throwable $exception): string
21
    {
22 1
        return $exception->getMessage();
23
    }
24
}
25