Completed
Pull Request — 0.3.x (#4)
by Alexandru-Daniel
05:07
created

OneTimePasswordToken::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Krtv\Bundle\SingleSignOnServiceProviderBundle\Authentication\Token;
4
5
use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
6
use Symfony\Component\Security\Core\Role\RoleInterface;
7
8
/**
9
 * Class OneTimePasswordToken
10
 * @package Krtv\Bundle\SingleSignOnServiceProviderBundle\Authentication\Token
11
 */
12
class OneTimePasswordToken extends AbstractToken
13
{
14
    /**
15
     * @var string
16
     */
17
    private $credentials;
18
19
    /**
20
     * @param string $credentials
21
     * @param array|RoleInterface[] $roles
22
     */
23
    public function __construct($credentials, array $roles = array())
24
    {
25
        parent::__construct($roles);
26
27
        $this->credentials = $credentials;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getCredentials()
34
    {
35
        return $this->credentials;
36
    }
37
}