Completed
Push — master ( d0ec23...67808b )
by Derek Stephen
01:52
created

Criteria::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

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 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
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
    protected $orderDirection;
12
13
    /**
14
     * @return bool
15
     */
16
    public function hasOffset()
17
    {
18
        return $this->offset !== null;
19
    }
20
21
    /**
22
     * @param $code
23
     * @return $this
24
     */
25
    public function setOffset($code)
26
    {
27
        $this->offset = $code;
28
        return $this;
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function getOffset()
35
    {
36
        return $this->offset;
37
    }
38
39
    /**
40
     * @return bool
41
     */
42
    public function hasLimit()
43
    {
44
        return $this->limit !== null;
45
    }
46
47
    /**
48
     * @param $code
49
     * @return $this
50
     */
51
    public function setLimit($code)
52
    {
53
        $this->limit = $code;
54
        return $this;
55
    }
56
57
    /**
58
     * @return mixed
59
     */
60
    public function getLimit()
61
    {
62
        return $this->limit;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    public function hasOrder()
69
    {
70
        return $this->order !== null;
71
    }
72
73
    /**
74
     * @param $code
75
     * @return $this
76
     */
77
    public function setOrder($order)
78
    {
79
        $this->order = $order;
80
        return $this;
81
    }
82
83
    /**
84
     * @return mixed
85
     */
86
    public function getOrder()
87
    {
88
        return $this->order;
89
    }
90
91
    /**
92
     * @return mixed
93
     */
94
    public function getOrderDirection()
95
    {
96
        return $this->orderDirection;
97
    }
98
99
    /**
100
     * @param mixed $orderDirection
101
     * @return Criteria
102
     */
103
    public function setOrderDirection($orderDirection)
104
    {
105
        $this->orderDirection = $orderDirection;
106
        return $this;
107
    }
108
109
    /**
110
     * @return bool
111
     */
112
    public function hasOrderDirection()
113
    {
114
        return $this->orderDirection !== null;
115
    }
116
117
118
}