Completed
Push — master ( 44c621...11b336 )
by Dragos
14:17
created

GetRequestTrait::getOffset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Speicher210\Fastbill\Api;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Trait for "Get" requests.
9
 */
10
trait GetRequestTrait
11
{
12
    /**
13
     * The limit on the number of elements in the query of a list.
14
     *
15
     * @var integer
16
     *
17
     * @JMS\Type("integer")
18
     * @JMS\SerializedName("LIMIT")
19
     */
20
    protected $limit = 100;
21
22
    /**
23
     * The offset for the request.
24
     *
25
     * @var integer
26
     *
27
     * @JMS\Type("integer")
28
     * @JMS\SerializedName("OFFSET")
29
     */
30
    protected $offset;
31
32
    /**
33
     * Get the limit on the number of elements in the query of a list.
34
     *
35
     * @return integer
36
     */
37
    public function getLimit()
38
    {
39
        return $this->limit;
40
    }
41
42
    /**
43
     * Set the limit for the request.
44
     *
45
     * @param integer $limit The limit.
46
     * @return $this
47
     */
48
    public function setLimit($limit)
49
    {
50
        $this->limit = $limit;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Get the offset.
57
     *
58
     * @return integer
59
     */
60
    public function getOffset()
61
    {
62
        return $this->offset;
63
    }
64
65
    /**
66
     * Set the offset of the request.
67
     *
68
     * @param integer $offset The offset.
69
     * @return $this
70
     */
71
    public function setOffset($offset)
72
    {
73
        $this->offset = $offset;
74
75
        return $this;
76
    }
77
}
78