Completed
Push — master ( cb42e4...38bddd )
by Yann
01:59
created

TokenConfiguration::getKeep()   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
     * @param string                  $purpose
39
     * @param TokenGeneratorInterface $generator
40
     * @param string                  $duration
41
     * @param integer                 $usages
42
     * @param string                  $keep
43
     */
44 3
    public function __construct($purpose, TokenGeneratorInterface $generator, $duration, $usages, $keep)
45
    {
46 3
        $this->purpose = $purpose;
47 3
        $this->generator = $generator;
48 3
        $this->duration = $duration;
49 3
        $this->usages = $usages;
50 3
        $this->keep = $keep;
51 3
    }
52
53
    /**
54
     * @return string
55
     */
56 3
    public function getPurpose()
57
    {
58 3
        return $this->purpose;
59
    }
60
61
    /**
62
     * @return TokenGeneratorInterface
63
     */
64 3
    public function getGenerator()
65
    {
66 3
        return $this->generator;
67
    }
68
69
    /**
70
     * @return string
71
     */
72 3
    public function getDuration()
73
    {
74 3
        return $this->duration;
75
    }
76
77
    /**
78
     * @return integer
79
     */
80 3
    public function getUsages()
81
    {
82 3
        return $this->usages;
83
    }
84
85
    /**
86
     * @return string
87
     */
88 1
    public function getKeep()
89
    {
90 1
        return $this->keep;
91
    }
92
}
93