ShibbolethExtension   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A getGlobals() 0 4 1
1
<?php
2
3
namespace Kuleuven\AuthenticationBundle\Twig;
4
5
use Kuleuven\AuthenticationBundle\Service\ShibbolethServiceProvider;
6
7
class ShibbolethExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
8
{
9
    /**
10
     * @var ShibbolethServiceProvider
11
     */
12
    protected $shibbolethServiceProvider;
13
14
    /**
15
     * @var array
16
     */
17
    protected $impersonateUsers;
18
19
    /**
20
     * @param ShibbolethServiceProvider $shibbolethServiceProvider
21
     */
22
    public function __construct(ShibbolethServiceProvider $shibbolethServiceProvider)
23
    {
24
        $this->shibbolethServiceProvider = $shibbolethServiceProvider;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getName()
31
    {
32
        return 'kuleuven_authentication';
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    public function getGlobals()
39
    {
40
        return ['kuleuven_shibboleth' => $this->shibbolethServiceProvider];
41
    }
42
}
43