Limit   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A limit() 0 6 1
A getLimit() 0 4 1
1
<?php
2
3
namespace JAQB\Query\Traits;
4
5
trait Limit
6
{
7
    /**
8
     * @var \JAQB\Statement\LimitStatement
9
     */
10
    protected $limit;
11
12
    /**
13
     * Sets the limit for the query.
14
     *
15
     * @param int $limit
16
     * @param int $offset
17
     *
18
     * @return self
19
     */
20
    public function limit($limit, $offset = 0)
21
    {
22
        $this->limit->setLimit($limit, $offset);
23
24
        return $this;
25
    }
26
27
    /**
28
     * Gets the limit statement for the query.
29
     *
30
     * @return \JAQB\Statement\LimitStatement
31
     */
32
    public function getLimit()
33
    {
34
        return $this->limit;
35
    }
36
}
37