1 | <?php |
||
10 | class BillShipper |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $accountNumber; |
||
16 | |||
17 | /** |
||
18 | * @var CreditCard |
||
19 | */ |
||
20 | private $creditCard; |
||
21 | |||
22 | /** |
||
23 | * @param \stdClass|null $attributes |
||
24 | */ |
||
25 | 3 | public function __construct(\stdClass $attributes = null) |
|
34 | |||
35 | /** |
||
36 | * @param null|DOMDocument $document |
||
37 | * |
||
38 | * @return DOMElement |
||
39 | */ |
||
40 | public function toNode(DOMDocument $document = null) |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getAccountNumber() |
||
61 | |||
62 | /** |
||
63 | * @param string $accountNumber |
||
64 | * |
||
65 | * @return BillShipper |
||
66 | */ |
||
67 | public function setAccountNumber($accountNumber) |
||
73 | |||
74 | /** |
||
75 | * @return CreditCard |
||
76 | */ |
||
77 | public function getCreditCard() |
||
81 | |||
82 | /** |
||
83 | * @param CreditCard $creditCard |
||
84 | * @return BillShipper |
||
85 | */ |
||
86 | public function setCreditCard(CreditCard $creditCard) |
||
92 | } |
||
93 |
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: