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

Config::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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