SignatureConfig::getSecret()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Rezzza\SecurityBundle\Security\Firewall;
4
5
use GuzzleHttp\Psr7\Request;
6
7
class SignatureConfig
8
{
9
    private $replayProtectionEnabled;
10
11
    private $algorithm;
12
13
    private $secret;
14
15
    public function __construct($replayProtectionEnabled, $algorithm, $secret)
16
    {
17
        $this->replayProtectionEnabled = (bool) $replayProtectionEnabled;
18
        $this->algorithm = $algorithm;
19
        $this->secret = $secret;
20
    }
21
22
    public function isReplayProtectionEnabled()
23
    {
24
        return true === $this->replayProtectionEnabled;
25
    }
26
27
    public function getAlgorithm()
28
    {
29
        return $this->algorithm;
30
    }
31
32
    public function getSecret()
33
    {
34
        return $this->secret;
35
    }
36
}
37