Completed
Push — master ( 4b394d...0ca4f0 )
by Damien
09:55
created

SignedElement   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A validate() 0 7 1
1
<?php
2
3
4
namespace flipbox\saml\core\validators;
5
6
7
use RobRichards\XMLSecLibs\XMLSecurityKey;
8
use SAML2\SignedElement as SamlSignedElement;
9
10
class SignedElement
11
{
12
    /**
13
     * @var XMLSecurityKey
14
     */
15
    private $xmlSecurityKey;
16
17
    /**
18
     * SignedElement constructor.
19
     * @param XMLSecurityKey $xmlSecurityKey
20
     */
21
    public function __construct(XMLSecurityKey $xmlSecurityKey)
22
    {
23
        $this->xmlSecurityKey = $xmlSecurityKey;
24
    }
25
26
27
    public function validate(SamlSignedElement $signedElement, $result)
28
    {
29
30
        $signedElement->validate($this->xmlSecurityKey);
31
32
        return $result;
33
    }
34
35
}