Completed
Push — master ( 0563c6...cb42e4 )
by Yann
02:20
created

TokenConfiguration::getPurpose()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yokai\SecurityTokenBundle\Configuration;
4
5
use Yokai\SecurityTokenBundle\Generator\TokenGeneratorInterface;
6
7
/**
8
 * @author Yann Eugoné <[email protected]>
9
 */
10
class TokenConfiguration
11
{
12
    /**
13
     * @var string
14
     */
15
    private $purpose;
16
17
    /**
18
     * @var TokenGeneratorInterface
19
     */
20
    private $generator;
21
22
    /**
23
     * @var string
24
     */
25
    private $duration;
26
27
    /**
28
     * @var integer
29
     */
30
    private $usages;
31
32
    /**
33
     * @param string                  $purpose
34
     * @param TokenGeneratorInterface $generator
35
     * @param string                  $duration
36
     * @param integer                 $usages
37
     */
38 3
    public function __construct($purpose, TokenGeneratorInterface $generator, $duration, $usages)
39
    {
40 3
        $this->purpose = $purpose;
41 3
        $this->generator = $generator;
42 3
        $this->duration = $duration;
43 3
        $this->usages = $usages;
44 3
    }
45
46
    /**
47
     * @return string
48
     */
49 3
    public function getPurpose()
50
    {
51 3
        return $this->purpose;
52
    }
53
54
    /**
55
     * @return TokenGeneratorInterface
56
     */
57 3
    public function getGenerator()
58
    {
59 3
        return $this->generator;
60
    }
61
62
    /**
63
     * @return string
64
     */
65 3
    public function getDuration()
66
    {
67 3
        return $this->duration;
68
    }
69
70
    /**
71
     * @return int
72
     */
73 3
    public function getUsages()
74
    {
75 3
        return $this->usages;
76
    }
77
}
78