Passed
Push — master ( fac4b0...616020 )
by Zoilo
02:03
created

InfallibleReporter::report()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace ZoiloMora\ElasticAPM\Reporter;
4
5
final class InfallibleReporter implements Reporter
6
{
7
    /**
8
     * @var Reporter
9
     */
10
    private $baseReporter;
11
12
    /**
13
     * @param Reporter $reporter
14
     */
15
    public function __construct(Reporter $reporter)
16
    {
17
        $this->baseReporter = $reporter;
18
    }
19
20
    /**
21
     * @param array $events
22
     *
23
     * @return void
24
     */
25
    public function report(array $events)
26
    {
27
        try {
28
            $this->baseReporter->report($events);
29
        } catch (\Throwable $exception) {
30
            // Nothing
31
        }
32
    }
33
}
34