1 | <?php |
||
12 | class DirectDebitPayment extends Payment |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $description; |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $iban; |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $name; |
||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $mandateId; |
||
30 | /** |
||
31 | * @var \DateTime |
||
32 | */ |
||
33 | private $mandateStartDate; |
||
34 | /** |
||
35 | * @var null|string |
||
36 | */ |
||
37 | private $transactionDescription; |
||
38 | |||
39 | /** |
||
40 | * IdealPayment constructor. |
||
41 | * @param Money $money |
||
42 | * @param string $purchaseId |
||
43 | * @param string $iban |
||
44 | * @param string $name |
||
45 | * @param string $mandateId |
||
46 | * @param \DateTime $mandateStartDate |
||
47 | * @param string $description |
||
48 | * @param string $transactionDescription = null |
||
49 | * @internal param string $bic |
||
50 | */ |
||
51 | 1 | public function __construct( |
|
52 | Money $money, |
||
53 | $purchaseId, |
||
54 | $iban, |
||
55 | $name, |
||
56 | $mandateId, |
||
57 | \DateTime $mandateStartDate, |
||
58 | $description, |
||
59 | $transactionDescription = null |
||
60 | ) { |
||
61 | 1 | parent::__construct($money, 'DirectDebit', $purchaseId); |
|
62 | |||
63 | 1 | $this->description = $description; |
|
64 | 1 | $this->iban = $iban; |
|
65 | 1 | $this->name = $name; |
|
66 | 1 | $this->mandateId = $mandateId; |
|
67 | 1 | $this->mandateStartDate = $mandateStartDate; |
|
68 | 1 | $this->transactionDescription = $transactionDescription; |
|
69 | 1 | } |
|
70 | |||
71 | /** @inheritdoc */ |
||
72 | 1 | public function toArray() |
|
87 | } |
||
88 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: