Completed
Push — master ( cb219e...c0b8c4 )
by Joshua
13s queued 10s
created

Filter::setQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the SeamsCMSDeliverySdk package.
7
 *
8
 * (c) Seams-CMS.com
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace SeamsCMS\Delivery;
15
16
/**
17
 * Class Filter
18
 * @package SeamsCMS\Delivery
19
 */
20
class Filter
21
{
22
    /** @var int */
23
    protected $offset = 0;
24
25
    /** @var int */
26
    protected $limit = 100;
27
28
    /** @var string */
29
    protected $sort = "";
30
31
    /** @var string */
32
    protected $query = "";
33
34
    /**
35
     * @return int
36
     */
37 5
    public function getOffset(): int
38
    {
39 5
        return $this->offset;
40
    }
41
42
    /**
43
     * @param int $offset
44
     */
45 4
    public function setOffset(int $offset)
46
    {
47 4
        $this->offset = $offset;
48 4
    }
49
50
    /**
51
     * @return int
52
     */
53 5
    public function getLimit(): int
54
    {
55 5
        return $this->limit;
56
    }
57
58
    /**
59
     * @param int $limit
60
     */
61 4
    public function setLimit(int $limit)
62
    {
63 4
        $this->limit = $limit;
64 4
    }
65
66
    /**
67
     * @return string
68
     */
69 5
    public function getSort(): string
70
    {
71 5
        return $this->sort;
72
    }
73
74
    /**
75
     * @param string $sort
76
     */
77 3
    public function setSort(string $sort)
78
    {
79 3
        $this->sort = $sort;
80 3
    }
81
82
    /**
83
     * @return string
84
     */
85 5
    public function getQuery(): string
86
    {
87 5
        return $this->query;
88
    }
89
90
    /**
91
     * @param string $query
92
     */
93 2
    public function setQuery(string $query)
94
    {
95 2
        $this->query = $query;
96 2
    }
97
}
98