Passed
Push — master ( 8884a6...674cbd )
by sarnado
02:38
created

APIUsageObject::getCurrent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
4
namespace Sarnado\Converter\Objects;
5
6
7
/**
8
 * Class APIUsageObject
9
 * @package Sarnado\Converter\Objects
10
 */
11
class APIUsageObject
12
{
13
    /**
14
     * @var int
15
     */
16
    private $current;
17
    /**
18
     * @var int
19
     */
20
    private $available;
21
    /**
22
     * @var int
23
     */
24
    private $refreshAfter;
25
26
    /**
27
     * APIUsageObject constructor.
28
     * @param int $current
29
     * @param int $available
30
     * @param int $refreshAfter
31
     */
32 3
    public function __construct(int $current, int $available, int $refreshAfter)
33
    {
34 3
        $this->setCurrent($current);
35 3
        $this->setAvailable($available);
36 3
        $this->setRefreshAfter($refreshAfter);
37 3
    }
38
39
    /**
40
     * @return int
41
     */
42 3
    public function getCurrent(): int
43
    {
44 3
        return $this->current;
45
    }
46
47
    /**
48
     * @param int $current
49
     */
50 3
    public function setCurrent(int $current)
51
    {
52 3
        $this->current = $current;
53 3
    }
54
55
    /**
56
     * @return int
57
     */
58 3
    public function getAvailable(): int
59
    {
60 3
        return $this->available;
61
    }
62
63
    /**
64
     * @param int $available
65
     */
66 3
    public function setAvailable(int $available)
67
    {
68 3
        $this->available = $available;
69 3
    }
70
71
    /**
72
     * @return int
73
     */
74 3
    public function getRefreshAfter(): int
75
    {
76 3
        return $this->refreshAfter;
77
    }
78
79
    /**
80
     * @param int $refreshAfter
81
     */
82 3
    public function setRefreshAfter(int $refreshAfter)
83
    {
84 3
        $this->refreshAfter = $refreshAfter;
85 3
    }
86
}
87