Passed
Push — master ( 6afdcd...dc022a )
by Hirofumi
05:03
created

FilterNotifications   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 72
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A specification() 0 4 1
A orderings() 0 4 1
A maxResults() 0 4 1
A firstResult() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shippinno\Notification\Application\Query;
5
6
use Tanigami\Specification\Specification;
7
8
class FilterNotifications
9
{
10
    /**
11
     * @var Specification
12
     */
13
    private $specification;
14
15
    /**
16
     * @var array|null
17
     */
18
    private $orderings;
19
20
    /**
21
     * @var int|null
22
     */
23
    private $maxResults;
24
25
    /**
26
     * @var int|null
27
     */
28
    private $firstResult;
29
30
    /**
31
     * @param Specification $specification
32
     * @param array|null $orderings
33
     * @param int|null $maxResults
34
     * @param int|null $firstResult
35
     */
36 1
    public function __construct(
37
        Specification $specification,
38
        array $orderings = null,
39
        int $maxResults = null,
40
        int $firstResult = null
41
    ) {
42 1
        $this->specification = $specification;
43 1
        $this->orderings = $orderings;
44 1
        $this->maxResults = $maxResults;
45 1
        $this->firstResult = $firstResult;
46 1
    }
47
48
    /**
49
     * @return Specification
50
     */
51 1
    public function specification(): Specification
52
    {
53 1
        return $this->specification;
54
    }
55
56
    /**
57
     * @return array|null
58
     */
59 1
    public function orderings(): ?array
60
    {
61 1
        return $this->orderings;
62
    }
63
64
    /**
65
     * @return int|null
66
     */
67 1
    public function maxResults(): ?int
68
    {
69 1
        return $this->maxResults;
70
    }
71
72
    /**
73
     * @return int|null
74
     */
75 1
    public function firstResult(): ?int
76
    {
77 1
        return $this->firstResult;
78
    }
79
}
80