Passed
Pull Request — master (#4)
by
unknown
02:33
created

AgentConfiguration::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace SamuelBednarcik\ElasticAPMAgent;
4
5
use SamuelBednarcik\ElasticAPMAgent\Events\Metadata;
6
7
class AgentConfiguration
8
{
9
    /** @var string */
10
    private $serviceName;
11
12
    /** @var string */
13
    private $serverUrl;
14
15
    /** @var Metadata */
16
    private $metadata;
17
18
    /** @var string|null */
19
    private $secretToken;
20
21
    public function __construct(
22
        string $serviceName,
23
        string $serverUrl,
24
        Metadata $metadata
25
    ) {
26
        $this->serviceName = $serviceName;
27
        $this->serverUrl = $serverUrl;
28
        $this->metadata = $metadata;
29
    }
30
31
    public function getServiceName(): string
32
    {
33
        return $this->serviceName;
34
    }
35
36
    public function getServerUrl(): string
37
    {
38
        return $this->serverUrl;
39
    }
40
41
    public function getMetadata(): Metadata
42
    {
43
        return $this->metadata;
44
    }
45
46
    public function getSecretToken(): ?string
47
    {
48
        return $this->secretToken;
49
    }
50
51
    public function setSecretToken(?string $secretToken): void
52
    {
53
        $this->secretToken = $secretToken;
54
    }
55
}
56