Filter::setLimit()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
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
     * @return void
45
     */
46 4
    public function setOffset(int $offset)
47
    {
48 4
        $this->offset = $offset;
49 4
    }
50
51
    /**
52
     * @return int
53
     */
54 5
    public function getLimit(): int
55
    {
56 5
        return $this->limit;
57
    }
58
59
    /**
60
     * @param int $limit
61
     * @return void
62
     */
63 4
    public function setLimit(int $limit)
64
    {
65 4
        $this->limit = $limit;
66 4
    }
67
68
    /**
69
     * @return string
70
     */
71 5
    public function getSort(): string
72
    {
73 5
        return $this->sort;
74
    }
75
76
    /**
77
     * @param string $sort
78
     * @return void
79
     */
80 3
    public function setSort(string $sort)
81
    {
82 3
        $this->sort = $sort;
83 3
    }
84
85
    /**
86
     * @return string
87
     */
88 5
    public function getQuery(): string
89
    {
90 5
        return $this->query;
91
    }
92
93
    /**
94
     * @param string $query
95
     * @return void
96
     */
97 2
    public function setQuery(string $query)
98
    {
99 2
        $this->query = $query;
100 2
    }
101
}
102