Completed
Push — feature/fixing_cost ( ef981e )
by Laurent
01:53
created

CreateDamageCommand::setBillId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace FlightLog\Application\Damage\Command;
5
6
7
final class CreateDamageCommand
8
{
9
10
    /**
11
     * @var int
12
     */
13
    private $flightId;
14
15
    /**
16
     * @var int
17
     */
18
    private $authorId;
19
20
    /**
21
     * @var float
22
     */
23
    private $amount;
24
25
    /**
26
     * @var int
27
     */
28
    private $billId;
29
30
    public function __construct($flightId, $authorId)
31
    {
32
        $this->flightId = $flightId;
33
        $this->authorId = $authorId;
34
35
        $this->billId = -1;
36
        $this->amount = 1;
0 ignored issues
show
Documentation Bug introduced by
The property $amount was declared of type double, but 1 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function getFlightId()
43
    {
44
        return $this->flightId;
45
    }
46
47
    /**
48
     * @param int $flightId
49
     */
50
    public function setFlightId($flightId)
51
    {
52
        $this->flightId = $flightId;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getAuthorId()
59
    {
60
        return $this->authorId;
61
    }
62
63
    /**
64
     * @param int $authorId
65
     */
66
    public function setAuthorId($authorId)
67
    {
68
        $this->authorId = $authorId;
69
    }
70
71
    /**
72
     * @return float
73
     */
74
    public function getAmount()
75
    {
76
        return $this->amount;
77
    }
78
79
    /**
80
     * @param float $amount
81
     */
82
    public function setAmount($amount)
83
    {
84
        $this->amount = $amount;
85
    }
86
87
    /**
88
     * @return int
89
     */
90
    public function getBillId()
91
    {
92
        return $this->billId;
93
    }
94
95
    /**
96
     * @param int $billId
97
     */
98
    public function setBillId($billId)
99
    {
100
        $this->billId = $billId;
101
    }
102
103
}