Completed
Push — master ( 4e360d...80bc96 )
by Daan van
07:27
created

SAML2_Compat_Ssp_Container   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 6
lcom 0
cbo 2
dl 0
loc 55
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A Container::__construct() 0 4 1
A Container::getLogger() 0 4 1
A Container::generateId() 0 4 1
A Container::debugMessage() 0 4 1
A Container::redirect() 0 4 1
1
<?php
2
3
namespace SAML2\Compat\Ssp;
4
5
use SAML2\Compat\AbstractContainer;
6
use SimpleSAML_Utilities;
7
8
class Container extends AbstractContainer
9
{
10
    /**
11
     * @var \Psr\Log\LoggerInterface
12
     */
13
    protected $logger;
14
15
    /**
16
     * Create a new SimpleSAMLphp compatible container.
17
     */
18
    public function __construct()
19
    {
20
        $this->logger = new Logger();
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function getLogger()
27
    {
28
        return $this->logger;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function generateId()
35
    {
36
        return SimpleSAML_Utilities::generateID();
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function debugMessage($message, $type)
43
    {
44
        SimpleSAML_Utilities::debugMessage($message, $type);
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function redirect($url, $data = array())
51
    {
52
        SimpleSAML_Utilities::redirectTrustedURL($url, $data);
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function postRedirect($url, $data = array())
59
    {
60
        SimpleSAML_Utilities::postRedirect($url, $data);
61
    }
62
}
63