Passed
Push — master ( 4a2c07...a97be8 )
by Zing
04:39
created

QueryConfiguration::setDelimiter()   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 1
Bugs 0 Features 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 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zing\QueryBuilder;
6
7
class QueryConfiguration
8
{
9
    /**
10
     * @phpstan-var non-empty-string
11
     *
12
     * @var string
13
     */
14
    private static $delimiter = ',';
15
16
    /**
17
     * @var int
18
     */
19
    private static $perPage = 15;
20
21
    /**
22
     * @var string
23
     */
24
    private static $pageName = 'per_page';
25
26
    /**
27
     * @phpstan-return non-empty-string
28
     */
29 33
    public static function getDelimiter(): string
30
    {
31 33
        return self::$delimiter;
32
    }
33
34
    /**
35
     * @phpstan-param non-empty-string $delimiter
36
     */
37 1
    public static function setDelimiter(string $delimiter): void
38
    {
39 1
        self::$delimiter = $delimiter;
40 1
    }
41
42 4
    public static function getPerPage(): int
43
    {
44 4
        return self::$perPage;
45
    }
46
47 46
    public static function setPerPage(int $perPage): void
48
    {
49 46
        self::$perPage = $perPage;
50 46
    }
51
52 1
    public static function getPageName(): string
53
    {
54 1
        return self::$pageName;
55
    }
56
57 46
    public static function setPageName(string $pageName): void
58
    {
59 46
        self::$pageName = $pageName;
60 46
    }
61
}
62