SignatureConfig   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A isReplayProtectionEnabled() 0 4 1
A getAlgorithm() 0 4 1
A getSecret() 0 4 1
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