Completed
Push — master ( f8086b...73ecc4 )
by Sebastian
14s
created

NewRelicMonitoring   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A nameTransaction() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
namespace Kartenmacherei\RestFramework\Monitoring;
5
6
use Kartenmacherei\NewRelic\NewRelic;
7
8
class NewRelicMonitoring implements TransactionMonitoring
9
{
10
    /**
11
     * @var NewRelic
12
     */
13
    private $newRelic;
14
15
    /**
16
     * @param NewRelic $newRelic
17
     */
18
    public function __construct(NewRelic $newRelic)
19
    {
20
        $this->newRelic = $newRelic;
21
    }
22
23
    public function nameTransaction(string $transactionName)
24
    {
25
        $this->newRelic->nameTransaction($transactionName);
26
    }
27
}
28