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

InfallibleReporter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A report() 0 5 2
A __construct() 0 3 1
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