Passed
Push — master ( da9ebc...eab3b6 )
by Tobias
02:14
created

BlackholeInteractor   A

Complexity

Total Complexity 21

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 100
rs 10
c 0
b 0
f 0
wmc 21

21 Methods

Rating   Name   Duplication   Size   Complexity  
A enableBackgroundJob() 0 2 1
A setUserAttributes() 0 3 1
A addCustomParameter() 0 3 1
A disableBackgroundJob() 0 2 1
A getBrowserTimingFooter() 0 3 1
A addCustomTracer() 0 3 1
A excludeFromApdex() 0 2 1
A addCustomEvent() 0 2 1
A setApplicationName() 0 3 1
A stopTransactionTiming() 0 2 1
A ignoreTransaction() 0 2 1
A setTransactionName() 0 3 1
A setCaptureParams() 0 2 1
A startTransaction() 0 3 1
A endTransaction() 0 3 1
A recordDatastoreSegment() 0 2 1
A getBrowserTimingHeader() 0 3 1
A noticeError() 0 7 1
A addCustomMetric() 0 3 1
A noticeThrowable() 0 2 1
A disableAutoRUM() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Ekino New Relic bundle.
7
 *
8
 * (c) Ekino - Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ekino\NewRelicBundle\NewRelic;
15
16
/**
17
 * This interactor throw away any call.
18
 *
19
 * It can be used to avoid conditional log calls.
20
 */
21
class BlackholeInteractor implements NewRelicInteractorInterface
22
{
23
    public function setApplicationName(string $name, string $license = null, bool $xmit = false): bool
24
    {
25
        return true;
26
    }
27
28
    public function setTransactionName(string $name): bool
29
    {
30
        return true;
31
    }
32
33
    public function ignoreTransaction(): void
34
    {
35
    }
36
37
    public function addCustomEvent(string $name, array $attributes): void
38
    {
39
    }
40
41
    public function addCustomMetric(string $name, float $value): bool
42
    {
43
        return true;
44
    }
45
46
    public function addCustomParameter(string $name, $value): bool
47
    {
48
        return true;
49
    }
50
51
    public function getBrowserTimingHeader(bool $includeTags = true): string
52
    {
53
        return '';
54
    }
55
56
    public function getBrowserTimingFooter(bool $includeTags = true): string
57
    {
58
        return '';
59
    }
60
61
    public function disableAutoRUM(): bool
62
    {
63
        return true;
64
    }
65
66
    public function noticeThrowable(\Throwable $e, string $message = null): void
67
    {
68
    }
69
70
    public function noticeError(
71
        int $errno,
72
        string $errstr,
73
        string $errfile = null,
74
        int $errline = null,
75
        string $errcontext = null
76
    ): void {
77
    }
78
79
    public function enableBackgroundJob(): void
80
    {
81
    }
82
83
    public function disableBackgroundJob(): void
84
    {
85
    }
86
87
    public function startTransaction(string $name = null, string $license = null): bool
88
    {
89
        return true;
90
    }
91
92
    public function endTransaction(bool $ignore = false): bool
93
    {
94
        return true;
95
    }
96
97
    public function excludeFromApdex(): void
98
    {
99
    }
100
101
    public function addCustomTracer(string $name): bool
102
    {
103
        return true;
104
    }
105
106
    public function setCaptureParams(bool $enabled): void
107
    {
108
    }
109
110
    public function stopTransactionTiming(): void
111
    {
112
    }
113
114
    public function recordDatastoreSegment(callable $func, array $parameters)
115
    {
116
    }
117
118
    public function setUserAttributes(string $userValue, string $accountValue, string $productValue): bool
119
    {
120
        return true;
121
    }
122
}
123