Completed
Push — master ( ead5e5...fe31fe )
by Yann
02:34
created

TokenConfiguration::getDuration()   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
     * @var string
34
     */
35
    private $keep;
36
37
    /**
38
     * @var bool
39
     */
40
    private $unique;
41
42
    /**
43
     * @param string                  $purpose
44
     * @param TokenGeneratorInterface $generator
45
     * @param string                  $duration
46
     * @param integer                 $usages
47
     * @param string                  $keep
48
     * @param boolean                 $unique
49
     */
50 3
    public function __construct($purpose, TokenGeneratorInterface $generator, $duration, $usages, $keep, $unique)
51
    {
52 3
        $this->purpose = $purpose;
53 3
        $this->generator = $generator;
54 3
        $this->duration = $duration;
55 3
        $this->usages = $usages;
56 3
        $this->keep = $keep;
57 3
        $this->unique = $unique;
58 3
    }
59
60
    /**
61
     * @return string
62
     */
63 3
    public function getPurpose()
64
    {
65 3
        return $this->purpose;
66
    }
67
68
    /**
69
     * @return TokenGeneratorInterface
70
     */
71 3
    public function getGenerator()
72
    {
73 3
        return $this->generator;
74
    }
75
76
    /**
77
     * @return string
78
     */
79 3
    public function getDuration()
80
    {
81 3
        return $this->duration;
82
    }
83
84
    /**
85
     * @return integer
86
     */
87 3
    public function getUsages()
88
    {
89 3
        return $this->usages;
90
    }
91
92
    /**
93
     * @return string
94
     */
95 1
    public function getKeep()
96
    {
97 1
        return $this->keep;
98
    }
99
100
    /**
101
     * @return bool
102
     */
103 1
    public function isUnique()
104
    {
105 1
        return $this->unique;
106
    }
107
}
108