Completed
Push — master ( 4966ad...2cf3a8 )
by Derek Stephen
02:07
created

Criteria::setOffset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Del\Common;
4
5
6
class Criteria
7
{
8
    protected $limit;
9
    protected $offset;
10
    protected $order;
11
12
    /**
13
     * @return bool
14
     */
15
    public function hasOffset()
16
    {
17
        return $this->offset !== null;
18
    }
19
20
    /**
21
     * @param $code
22
     * @return $this
23
     */
24
    public function setOffset($code)
25
    {
26
        $this->offset = $code;
27
        return $this;
28
    }
29
30
    /**
31
     * @return mixed
32
     */
33
    public function getOffset()
34
    {
35
        return $this->offset;
36
    }
37
38
    /**
39
     * @return bool
40
     */
41
    public function hasLimit()
42
    {
43
        return $this->limit !== null;
44
    }
45
46
    /**
47
     * @param $code
48
     * @return $this
49
     */
50
    public function setLimit($code)
51
    {
52
        $this->limit = $code;
53
        return $this;
54
    }
55
56
    /**
57
     * @return mixed
58
     */
59
    public function getLimit()
60
    {
61
        return $this->limit;
62
    }
63
64
    /**
65
     * @return bool
66
     */
67
    public function hasOrder()
68
    {
69
        return $this->order !== null;
70
    }
71
72
    /**
73
     * @param $code
74
     * @return $this
75
     */
76
    public function setOrder($code)
77
    {
78
        $this->order = $code;
79
        return $this;
80
    }
81
82
    /**
83
     * @return mixed
84
     */
85
    public function getOrder()
86
    {
87
        return $this->order;
88
    }
89
}