Passed
Pull Request — master (#3)
by Alexander
03:33
created

TokenRepositoryConfigMock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
4
namespace Wearesho\Yii\Tests\Mocks;
5
6
use Carbon\CarbonInterval;
7
8
use Wearesho\Yii\Interfaces\TokenRepositoryConfigInterface;
9
10
/**
11
 * Class TokenRepositorySettingsMock
12
 * @package Wearesho\Yii\Tests\Mocks
13
 */
14
class TokenRepositoryConfigMock implements TokenRepositoryConfigInterface
15
{
16
    /** @var  CarbonInterval */
17
    protected $expirePeriod;
18
19
    /** @var  int */
20
    protected $verifyLimit = 3;
21
22
    /** @var  int */
23
    protected $deliveryLimit = 3;
24
25
    /**
26
     * TokenRepositoryConfigMock constructor.
27
     */
28
    public function __construct()
29
    {
30
        $this->expirePeriod = new CarbonInterval(0, 0, 0, 0, 1);
31
    }
32
33
    /**
34
     * @return CarbonInterval
35
     */
36
    public function getExpirePeriod(): CarbonInterval
37
    {
38
        return $this->expirePeriod;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getVerifyLimit(): int
45
    {
46
        return $this->verifyLimit;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getDeliveryLimit(): int
53
    {
54
        return $this->deliveryLimit;
55
    }
56
57
    /**
58
     * @param CarbonInterval $expirePeriod
59
     */
60
    public function setExpirePeriod(CarbonInterval $expirePeriod)
61
    {
62
        $this->expirePeriod = $expirePeriod;
63
    }
64
65
    /**
66
     * @param int $deliveryLimit
67
     */
68
    public function setDeliveryLimit(int $deliveryLimit)
69
    {
70
        $this->deliveryLimit = $deliveryLimit;
71
    }
72
73
    /**
74
     * @param int $verifyLimit
75
     */
76
    public function setVerifyLimit(int $verifyLimit)
77
    {
78
        $this->verifyLimit = $verifyLimit;
79
    }
80
}