LimitNode::getLimit()   A
last analyzed

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
namespace Xiag\Rql\Parser\Node;
3
4
use Xiag\Rql\Parser\AbstractNode;
5
6
/**
7
 * @codeCoverageIgnore
8
 */
9
class LimitNode extends AbstractNode
10
{
11
    /**
12
     * @var int
13
     */
14
    protected $limit;
15
    /**
16
     * @var int
17
     */
18
    protected $offset;
19
20
    /**
21
     * @param int $limit
22
     * @param int $offset
23
     */
24
    public function __construct($limit, $offset = 0)
25
    {
26
        $this->limit = $limit;
27
        $this->offset = $offset;
28
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public function getNodeName()
34
    {
35
        return 'limit';
36
    }
37
38
    /**
39
     * @return int|null
40
     */
41
    public function getLimit()
42
    {
43
        return $this->limit;
44
    }
45
46
    /**
47
     * @param int $limit
48
     * @return void
49
     */
50
    public function setLimit($limit)
51
    {
52
        $this->limit = $limit;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getOffset()
59
    {
60
        return $this->offset;
61
    }
62
63
    /**
64
     * @param int $offset
65
     * @return void
66
     */
67
    public function setOffset($offset)
68
    {
69
        $this->offset = $offset;
70
    }
71
}
72