Passed
Push — master ( 52f4fd...745a73 )
by Bastien
01:42
created

DeamonLoggerExtraContext::getApplicationVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Deamon\LoggerExtraBundle\Services;
4
5
class DeamonLoggerExtraContext
6
{
7 6
    public function __construct(
8
        private ?string $applicationName,
9
        private ?string $locale = null,
10
        private ?string $applicationVersion = null)
11
    {
12 6
        if(null !== $applicationVersion){
13 1
            $this->applicationVersion = trim($this->applicationVersion);
14
        }
15
    }
16
17 4
    public function getLocale(): ?string
18
    {
19 4
        return $this->locale;
20
    }
21
22 4
    public function getApplicationName(): ?string
23
    {
24 4
        return $this->applicationName;
25
    }
26
27 2
    public function getApplicationVersion(): ?string
28
    {
29 2
        return $this->applicationVersion;
30
    }
31
}
32