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

Config   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getApplicationName() 0 4 1
A isTransactionMonitoringEnabled() 0 4 1
A getTransactionMapping() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
namespace Kartenmacherei\RestFramework;
5
6
class Config
7
{
8
    const DISABLE_MONITORING = false;
9
    const ENABLE_MONITORING = true;
10
11
    /**
12
     * @var string
13
     */
14
    private $applicationName;
15
16
    /**
17
     * @var bool
18
     */
19
    private $isTransactionMonitoringEnabled;
20
21
    /**
22
     * @var array
23
     */
24
    private $transactionNamesMapping;
25
26
    /**
27
     * @param string $applicationName
28
     * @param bool $isTransactionMonitoringEnabled
29
     * @param array $transactionNamesMapping
30
     */
31
    public function __construct(string $applicationName, bool $isTransactionMonitoringEnabled, array $transactionNamesMapping)
32
    {
33
        $this->applicationName = $applicationName;
34
        $this->isTransactionMonitoringEnabled = $isTransactionMonitoringEnabled;
35
        $this->transactionNamesMapping = $transactionNamesMapping;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getApplicationName(): string
42
    {
43
        return $this->applicationName;
44
    }
45
46
    /**
47
     * @return bool
48
     */
49
    public function isTransactionMonitoringEnabled(): bool
50
    {
51
        return $this->isTransactionMonitoringEnabled;
52
    }
53
54
    public function getTransactionMapping(): array
55
    {
56
        return $this->transactionNamesMapping;
57
    }
58
}
59