| 1 | <?php |
||
| 26 | class Charge implements \JsonSerializable |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @var int |
||
| 30 | */ |
||
| 31 | protected $id; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var ActionInterface |
||
| 35 | */ |
||
| 36 | protected $action; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var TypeInterface |
||
| 40 | */ |
||
| 41 | protected $type; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @var TargetInterface |
||
| 45 | */ |
||
| 46 | protected $target; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var QuantityInterface |
||
| 50 | */ |
||
| 51 | protected $usage; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @var Money |
||
| 55 | */ |
||
| 56 | protected $sum; |
||
| 57 | |||
| 58 | 3 | public function __construct( |
|
| 73 | |||
| 74 | public function getId() |
||
| 78 | |||
| 79 | 3 | public function getAction() |
|
| 83 | |||
| 84 | 3 | public function getTarget() |
|
| 88 | |||
| 89 | 3 | public function getType() |
|
| 93 | |||
| 94 | 3 | public function getUsage() |
|
| 98 | |||
| 99 | 3 | public function getSum() |
|
| 103 | |||
| 104 | public function getPrice() |
||
| 108 | |||
| 109 | public function jsonSerialize() |
||
| 113 | } |
||
| 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: