Completed
Push — master ( 5594ea...e43a77 )
by Laurent
03:34 queued 01:39
created

FlightForQuarterAndPilotQuery   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 58
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getPilotId() 0 4 1
A getQuarter() 0 4 1
A getYear() 0 4 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace flightlog\query;
7
8
use Webmozart\Assert\Assert;
9
10
/**
11
 * @author Laurent De Coninck <[email protected]>
12
 */
13
class FlightForQuarterAndPilotQuery
14
{
15
16
    /**
17
     * @var int
18
     */
19
    private $pilotId;
20
21
    /**
22
     * @var int
23
     */
24
    private $quarter;
25
26
    /**
27
     * @var int
28
     */
29
    private $year;
30
31
    /**
32
     * @param int $pilotId
33
     * @param int $quarter
34
     * @param int $year
35
     */
36
    public function __construct($pilotId, $quarter, $year)
37
    {
38
        Assert::integerish($pilotId);
39
        Assert::integerish($quarter);
40
        Assert::integerish($year);
41
42
        $this->pilotId = (int) $pilotId;
43
        $this->quarter = (int) $quarter;
44
        $this->year = (int) $year;
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getPilotId()
51
    {
52
        return $this->pilotId;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getQuarter()
59
    {
60
        return $this->quarter;
61
    }
62
63
    /**
64
     * @return int
65
     */
66
    public function getYear()
67
    {
68
        return $this->year;
69
    }
70
}