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

StorageReporter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
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