Completed
Pull Request — develop (#97)
by Boy
23:27 queued 19:58
created

SecondFactorLocaleProvider::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Surfnet\StepupGateway\GatewayBundle\Service;
4
5
use Surfnet\StepupBundle\Service\LocaleProviderService;
6
use Surfnet\StepupGateway\GatewayBundle\Saml\Proxy\ProxyStateHandler;
7
8
final class SecondFactorLocaleProvider implements LocaleProviderService
9
{
10
    /**
11
     * @var ProxyStateHandler
12
     */
13
    private $stateHandler;
14
15
    public function __construct(ProxyStateHandler $stateHandler)
16
    {
17
        $this->stateHandler = $stateHandler;
18
    }
19
20
    /**
21
     * @return string
22
     */
23
    public function determinePreferredLocale()
24
    {
25
        return (string) $this->stateHandler->getPreferredLocale();
26
    }
27
}
28