Passed
Push — master ( 81d966...4376d2 )
by butschster
23:34 queued 15s
created

StorageReporter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A report() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Exceptions\Reporter;
6
7
use Spiral\Exceptions\ExceptionReporterInterface;
8
use Spiral\Snapshots\StorageSnapshot;
9
10
class StorageReporter implements ExceptionReporterInterface
11
{
12
    public function __construct(
13
        private StorageSnapshot $storageSnapshot,
14
    ) {
15
    }
16
17
    public function report(\Throwable $exception): void
18
    {
19
        $this->storageSnapshot->create($exception);
20
    }
21
}
22