Completed
Pull Request — master (#2229)
by
unknown
02:50
created

LimitOffsetPagination   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 39
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLimit() 0 4 1
A setLimit() 0 6 1
A getOffset() 0 4 1
A setOffset() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the FOSRestBundle package.
7
 *
8
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.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 FOS\RestBundle\Request\Pagination;
15
16
/**
17
 * @author Bartek Chmura <[email protected]>
18
 */
19
final class LimitOffsetPagination implements PaginationInterface
20
{
21
    const DEFAULT_LIMIT = "16";
22
    const DEFAULT_OFFSET = "0";
23
24
    /**
25
     * @var string
26
     */
27
    private $limit = self::DEFAULT_LIMIT;
28
29
    /**
30
     * @var string
31
     */
32
    private $offset = self::DEFAULT_OFFSET;
33
34
    public function getLimit(): string
35
    {
36
        return $this->limit;
37
    }
38
39
    public function setLimit(string $limit): self
40
    {
41
        $this->limit = $limit;
42
43
        return $this;
44
    }
45
46
    public function getOffset(): string
47
    {
48
        return $this->offset;
49
    }
50
51
    public function setOffset(string $offset): self
52
    {
53
        $this->offset = $offset;
54
55
        return $this;
56
    }
57
}
58