Passed
Pull Request — master (#3)
by Alexander
02:51
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
 * @internal
15
 */
16
class TokenRepositoryConfigMock implements TokenRepositoryConfigInterface
17
{
18
    /** @var  CarbonInterval */
19
    protected $expirePeriod;
20
21
    /** @var  int */
22
    protected $verifyLimit = 3;
23
24
    /** @var  int */
25
    protected $deliveryLimit = 3;
26
27
    /**
28
     * TokenRepositoryConfigMock constructor.
29
     */
30
    public function __construct()
31
    {
32
        $this->expirePeriod = new CarbonInterval(0, 0, 0, 0, 1);
33
    }
34
35
    /**
36
     * @return CarbonInterval
37
     */
38
    public function getExpirePeriod(): CarbonInterval
39
    {
40
        return $this->expirePeriod;
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getVerifyLimit(): int
47
    {
48
        return $this->verifyLimit;
49
    }
50
51
    /**
52
     * @return int
53
     */
54
    public function getDeliveryLimit(): int
55
    {
56
        return $this->deliveryLimit;
57
    }
58
59
    /**
60
     * @param CarbonInterval $expirePeriod
61
     */
62
    public function setExpirePeriod(CarbonInterval $expirePeriod)
63
    {
64
        $this->expirePeriod = $expirePeriod;
65
    }
66
67
    /**
68
     * @param int $deliveryLimit
69
     */
70
    public function setDeliveryLimit(int $deliveryLimit)
71
    {
72
        $this->deliveryLimit = $deliveryLimit;
73
    }
74
75
    /**
76
     * @param int $verifyLimit
77
     */
78
    public function setVerifyLimit(int $verifyLimit)
79
    {
80
        $this->verifyLimit = $verifyLimit;
81
    }
82
}