Passed
Push — main ( b4ea3d...ecbac5 )
by Tim
13:33
created

SiteConfiguration   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 103
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 34
dl 0
loc 103
rs 10
c 0
b 0
f 0
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getRedirectHttpStatusCode() 0 3 1
A isDisableRedirectWithBackendSession() 0 3 1
A __construct() 0 24 1
A getMaxMindMode() 0 3 1
A isEnableLanguageDetection() 0 3 1
A isAllowAllPaths() 0 3 1
A getFallbackDetectionLanguage() 0 3 1
A getForwardRedirectParameters() 0 3 1
A getMaxMindLicenseKey() 0 3 1
A getMaxMindDatabasePath() 0 3 1
A getAddIpLocationToBrowserLanguage() 0 3 1
A getMaxMindAccountId() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lochmueller\LanguageDetection\Domain\Model\Dto;
6
7
class SiteConfiguration
8
{
9
    protected bool $enableLanguageDetection;
10
11
    protected bool $disableRedirectWithBackendSession;
12
13
    protected string $addIpLocationToBrowserLanguage;
14
15
    protected bool $allowAllPaths;
16
17
    protected int $redirectHttpStatusCode;
18
19
    protected string $forwardRedirectParameters;
20
21
    protected int $fallbackDetectionLanguage;
22
23
    protected string $maxMindDatabasePath;
24
25
    protected int $maxMindAccountId;
26
27
    protected string $maxMindLicenseKey;
28
29
    protected string $maxMindMode;
30
31
    public function __construct(
32
        bool $enableLanguageDetection,
33
        bool $disableRedirectWithBackendSession,
34
        string $addIpLocationToBrowserLanguage,
35
        bool $allowAllPaths,
36
        int $redirectHttpStatusCode,
37
        string $forwardRedirectParameters,
38
        int $fallbackDetectionLanguage,
39
        string $maxMindDatabasePath,
40
        int $maxMindAccountId,
41
        string $maxMindLicenseKey,
42
        string $maxMindMode
43
    ) {
44
        $this->enableLanguageDetection = $enableLanguageDetection;
45
        $this->disableRedirectWithBackendSession = $disableRedirectWithBackendSession;
46
        $this->addIpLocationToBrowserLanguage = $addIpLocationToBrowserLanguage;
47
        $this->allowAllPaths = $allowAllPaths;
48
        $this->redirectHttpStatusCode = $redirectHttpStatusCode;
49
        $this->forwardRedirectParameters = $forwardRedirectParameters;
50
        $this->fallbackDetectionLanguage = $fallbackDetectionLanguage;
51
        $this->maxMindDatabasePath = $maxMindDatabasePath;
52
        $this->maxMindAccountId = $maxMindAccountId;
53
        $this->maxMindLicenseKey = $maxMindLicenseKey;
54
        $this->maxMindMode = $maxMindMode;
55
    }
56
57
    public function isEnableLanguageDetection(): bool
58
    {
59
        return $this->enableLanguageDetection;
60
    }
61
62
    public function isDisableRedirectWithBackendSession(): bool
63
    {
64
        return $this->disableRedirectWithBackendSession;
65
    }
66
67
    public function getAddIpLocationToBrowserLanguage(): string
68
    {
69
        return $this->addIpLocationToBrowserLanguage;
70
    }
71
72
    public function isAllowAllPaths(): bool
73
    {
74
        return $this->allowAllPaths;
75
    }
76
77
    public function getRedirectHttpStatusCode(): int
78
    {
79
        return $this->redirectHttpStatusCode;
80
    }
81
82
    public function getForwardRedirectParameters(): string
83
    {
84
        return $this->forwardRedirectParameters;
85
    }
86
87
    public function getFallbackDetectionLanguage(): int
88
    {
89
        return $this->fallbackDetectionLanguage;
90
    }
91
92
    public function getMaxMindDatabasePath(): string
93
    {
94
        return $this->maxMindDatabasePath;
95
    }
96
97
    public function getMaxMindAccountId(): int
98
    {
99
        return $this->maxMindAccountId;
100
    }
101
102
    public function getMaxMindLicenseKey(): string
103
    {
104
        return $this->maxMindLicenseKey;
105
    }
106
107
    public function getMaxMindMode(): string
108
    {
109
        return $this->maxMindMode;
110
    }
111
}
112