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

OneTimePasswordToken   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 2 Features 0
Metric Value
wmc 2
c 2
b 2
f 0
lcom 0
cbo 1
dl 0
loc 26
ccs 0
cts 9
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCredentials() 0 4 1
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
}