1 | <?php |
||
41 | class TreeBuilder |
||
42 | { |
||
43 | /** |
||
44 | * Map section classes to record store array names |
||
45 | */ |
||
46 | private const SECTION_TO_RECORD_STORE_MAP = [ |
||
47 | 'MandateRequestSection' => 'mandates', |
||
48 | 'PaymentRequestSection' => 'payments', |
||
49 | 'AmendmentRequestSection' => 'amendments' |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * @var Record Opening record used for each section |
||
54 | */ |
||
55 | private $opening; |
||
56 | |||
57 | /** |
||
58 | * @var Record[] List of created mandate requests |
||
59 | */ |
||
60 | private $mandates; |
||
61 | |||
62 | /** |
||
63 | * @var Record[] List of created payment requests |
||
64 | */ |
||
65 | private $payments; |
||
66 | |||
67 | /** |
||
68 | * @var Record[] List of created amendment requests |
||
69 | */ |
||
70 | private $amendments; |
||
71 | |||
72 | /** |
||
73 | * @var string Payee BGC customer number |
||
74 | */ |
||
75 | private $bgcNr; |
||
76 | |||
77 | /** |
||
78 | * @var Obj Wrapper around payee bankgiro account number |
||
79 | */ |
||
80 | private $payeeBgNode; |
||
81 | |||
82 | /** |
||
83 | * @var \DateTimeInterface Date of file creation |
||
84 | */ |
||
85 | private $date; |
||
86 | |||
87 | /** |
||
88 | * @var RepititionsFormatter |
||
89 | */ |
||
90 | private $repititionsFormatter; |
||
91 | |||
92 | /** |
||
93 | * @param string $bgcNr The BGC customer number of payee |
||
94 | * @param Bankgiro $bankgiro Payee bankgiro account number |
||
95 | * @param \DateTimeInterface $date Creation date |
||
96 | * @param RepititionsFormatter $repititionsFormatter Repititions formatter |
||
97 | */ |
||
98 | public function __construct( |
||
110 | |||
111 | /** |
||
112 | * Reset builder to initial state |
||
113 | */ |
||
114 | public function reset(): void |
||
129 | |||
130 | /** |
||
131 | * Add a new mandate request to tree |
||
132 | */ |
||
133 | public function addCreateMandateRequest(string $payerNr, AccountNumber $account, IdInterface $id): void |
||
144 | |||
145 | /** |
||
146 | * Add a delete mandate request to tree |
||
147 | */ |
||
148 | public function addDeleteMandateRequest(string $payerNr): void |
||
157 | |||
158 | /** |
||
159 | * Add an accept digital mandate request to tree |
||
160 | */ |
||
161 | public function addAcceptDigitalMandateRequest(string $payerNr): void |
||
170 | |||
171 | /** |
||
172 | * Add a reject digital mandate request to tree |
||
173 | */ |
||
174 | public function addRejectDigitalMandateRequest(string $payerNr): void |
||
185 | |||
186 | /** |
||
187 | * Add an update mandate request to tree |
||
188 | */ |
||
189 | public function addUpdateMandateRequest(string $payerNr, string $newPayerNr): void |
||
200 | |||
201 | /** |
||
202 | * Add an incoming payment request to tree |
||
203 | */ |
||
204 | public function addIncomingPaymentRequest( |
||
222 | |||
223 | /** |
||
224 | * Add an outgoing payment request to tree |
||
225 | */ |
||
226 | public function addOutgoingPaymentRequest( |
||
244 | |||
245 | /** |
||
246 | * Add an incoming payment at next possible bank date request to tree |
||
247 | */ |
||
248 | public function addImmediateIncomingPaymentRequest(string $payerNr, SEK $amount, string $ref): void |
||
252 | |||
253 | /** |
||
254 | * Add an outgoing payment at next possible bank date request to tree |
||
255 | */ |
||
256 | public function addImmediateOutgoingPaymentRequest(string $payerNr, SEK $amount, string $ref): void |
||
260 | |||
261 | /** |
||
262 | * Add a delete payment request to tree |
||
263 | */ |
||
264 | public function addDeletePaymentRequest(string $payerNr): void |
||
273 | |||
274 | /** |
||
275 | * Get the created request tree |
||
276 | */ |
||
277 | public function buildTree(): AutogiroFile |
||
289 | |||
290 | private function addPaymentRequest( |
||
312 | |||
313 | private function addImmediatePaymentRequest(string $nodename, string $payerNr, SEK $amount, string $ref): void |
||
328 | } |
||
329 |
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: