Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
58 | 3 | public function __construct( |
|
59 | $id, |
||
60 | ActionInterface $action, |
||
61 | TypeInterface $type, |
||
62 | TargetInterface $target, |
||
63 | QuantityInterface $usage, |
||
64 | Money $sum |
||
65 | ) { |
||
66 | 3 | $this->id = $id; |
|
67 | 3 | $this->action = $action; |
|
68 | 3 | $this->type = $type; |
|
69 | 3 | $this->target = $target; |
|
70 | 3 | $this->usage = $usage; |
|
71 | 3 | $this->sum = $sum; |
|
72 | 3 | } |
|
73 | |||
114 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: