LimitNode   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 63
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getNodeName() 0 4 1
A getLimit() 0 4 1
A setLimit() 0 4 1
A getOffset() 0 4 1
A setOffset() 0 4 1
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