Completed
Push — master ( 31ed8c...a72c28 )
by Dragos
09:43
created

AbstractRequestData::setOffset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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