Passed
Push — master ( 51de37...c19c1b )
by Adrien
05:34 queued 12s
created
src/Decoder/EntryTransactionDetail.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             if (isset($xmlRelatedParty->Cdtr)) {
78 78
                 $xmlRelatedPartyType = $xmlRelatedParty->Cdtr;
79 79
                 $xmlRelatedPartyTypeAccount = $xmlRelatedParty->CdtrAcct;
80
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
80
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
81 81
                 $relatedPartyType = $creditor = new DTO\Creditor($xmlRelatedPartyName);
82 82
 
83 83
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType, $xmlRelatedPartyTypeAccount);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
             if (isset($xmlRelatedParty->UltmtCdtr)) {
87 87
                 $xmlRelatedPartyType = $xmlRelatedParty->UltmtCdtr;
88
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
88
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
89 89
                 $relatedPartyType = $creditor = new DTO\UltimateCreditor($xmlRelatedPartyName);
90 90
 
91 91
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             if (isset($xmlRelatedParty->Dbtr)) {
95 95
                 $xmlRelatedPartyType = $xmlRelatedParty->Dbtr;
96 96
                 $xmlRelatedPartyTypeAccount = $xmlRelatedParty->DbtrAcct;
97
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
97
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
98 98
                 $relatedPartyType = $debtor = new DTO\Debtor($xmlRelatedPartyName);
99 99
 
100 100
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType, $xmlRelatedPartyTypeAccount);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
             if (isset($xmlRelatedParty->UltmtDbtr)) {
104 104
                 $xmlRelatedPartyType = $xmlRelatedParty->UltmtDbtr;
105
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
105
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
106 106
                 $relatedPartyType = $creditor = new DTO\UltimateDebtor($xmlRelatedPartyName);
107 107
 
108 108
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType);
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
 
144 144
         foreach ($xmlDetail->RltdAgts as $xmlRelatedAgent) {
145 145
             if (isset($xmlRelatedAgent->CdtrAgt)) {
146
-                $agent = new DTO\CreditorAgent((string)$xmlRelatedAgent->CdtrAgt->FinInstnId->Nm, (string)$xmlRelatedAgent->CdtrAgt->FinInstnId->BIC);
147
-                $relatedAgent =  new DTO\RelatedAgent($agent);
146
+                $agent = new DTO\CreditorAgent((string) $xmlRelatedAgent->CdtrAgt->FinInstnId->Nm, (string) $xmlRelatedAgent->CdtrAgt->FinInstnId->BIC);
147
+                $relatedAgent = new DTO\RelatedAgent($agent);
148 148
                 $detail->addRelatedAgent($relatedAgent);
149 149
             }
150 150
 
151 151
             if (isset($xmlRelatedAgent->DbtrAgt)) {
152
-                $agent = new DTO\DebtorAgent((string)$xmlRelatedAgent->DbtrAgt->FinInstnId->Nm, (string)$xmlRelatedAgent->DbtrAgt->FinInstnId->BIC);
153
-                $relatedAgent =  new DTO\RelatedAgent($agent);
152
+                $agent = new DTO\DebtorAgent((string) $xmlRelatedAgent->DbtrAgt->FinInstnId->Nm, (string) $xmlRelatedAgent->DbtrAgt->FinInstnId->BIC);
153
+                $relatedAgent = new DTO\RelatedAgent($agent);
154 154
                 $detail->addRelatedAgent($relatedAgent);
155 155
             }
156 156
         }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         if ($xmlDetailsUnstructuredBlocks !== null) {
175 175
             foreach ($xmlDetailsUnstructuredBlocks as $xmlDetailsUnstructuredBlock) {
176 176
                 $unstructuredRemittanceInformation = new DTO\UnstructuredRemittanceInformation(
177
-                    (string)$xmlDetailsUnstructuredBlock
177
+                    (string) $xmlDetailsUnstructuredBlock
178 178
                 );
179 179
 
180 180
                 $remittanceInformation->addUnstructuredBlock($unstructuredRemittanceInformation);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 if ($remittanceInformation->getMessage() === null) {
184 184
                     $unstructuredBlockExists = true;
185 185
                     $remittanceInformation->setMessage(
186
-                        (string)$xmlDetailsUnstructuredBlock
186
+                        (string) $xmlDetailsUnstructuredBlock
187 187
                     );
188 188
                 }
189 189
             }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
                 if (isset($xmlDetailsStructuredBlock->AddtlRmtInf)) {
199 199
                     $structuredRemittanceInformation->setAdditionalRemittanceInformation(
200
-                        (string)$xmlDetailsStructuredBlock->AddtlRmtInf
200
+                        (string) $xmlDetailsStructuredBlock->AddtlRmtInf
201 201
                     );
202 202
                 }
203 203
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
                     if (isset($xmlDetailsStructuredBlock->CdtrRefInf->Ref)) {
208 208
                         $creditorReferenceInformation->setRef(
209
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Ref
209
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Ref
210 210
                         );
211 211
                     }
212 212
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry)
215 215
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry)) {
216 216
                         $creditorReferenceInformation->setProprietary(
217
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry
217
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry
218 218
                         );
219 219
                     }
220 220
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry)
223 223
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd)) {
224 224
                         $creditorReferenceInformation->setCode(
225
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd
225
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd
226 226
                         );
227 227
                     }
228 228
 
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
     {
271 271
         if (isset($xmlDetail->RtrInf) && isset($xmlDetail->RtrInf->Rsn->Cd)) {
272 272
             $remittanceInformation = DTO\ReturnInformation::fromUnstructured(
273
-                (string)$xmlDetail->RtrInf->Rsn->Cd,
274
-                (string)$xmlDetail->RtrInf->AddtlInf
273
+                (string) $xmlDetail->RtrInf->Rsn->Cd,
274
+                (string) $xmlDetail->RtrInf->AddtlInf
275 275
             );
276 276
             $detail->setReturnInformation($remittanceInformation);
277 277
         }
@@ -304,8 +304,8 @@  discard block
 block discarded – undo
304 304
 
305 305
             if (isset($xmlDetail->BkTxCd->Prtry)) {
306 306
                 $proprietaryBankTransactionCode = new DTO\ProprietaryBankTransactionCode(
307
-                    (string)$xmlDetail->BkTxCd->Prtry->Cd,
308
-                    (string)$xmlDetail->BkTxCd->Prtry->Issr
307
+                    (string) $xmlDetail->BkTxCd->Prtry->Cd,
308
+                    (string) $xmlDetail->BkTxCd->Prtry->Issr
309 309
                 );
310 310
 
311 311
                 $bankTransactionCode->setProprietary($proprietaryBankTransactionCode);
@@ -313,13 +313,13 @@  discard block
 block discarded – undo
313 313
 
314 314
             if (isset($xmlDetail->BkTxCd->Domn)) {
315 315
                 $domainBankTransactionCode = new DTO\DomainBankTransactionCode(
316
-                    (string)$xmlDetail->BkTxCd->Domn->Cd
316
+                    (string) $xmlDetail->BkTxCd->Domn->Cd
317 317
                 );
318 318
 
319 319
                 if (isset($xmlDetail->BkTxCd->Domn->Fmly)) {
320 320
                     $domainFamilyBankTransactionCode = new DTO\DomainFamilyBankTransactionCode(
321
-                        (string)$xmlDetail->BkTxCd->Domn->Fmly->Cd,
322
-                        (string)$xmlDetail->BkTxCd->Domn->Fmly->SubFmlyCd
321
+                        (string) $xmlDetail->BkTxCd->Domn->Fmly->Cd,
322
+                        (string) $xmlDetail->BkTxCd->Domn->Fmly->SubFmlyCd
323 323
                     );
324 324
 
325 325
                     $domainBankTransactionCode->setFamily($domainFamilyBankTransactionCode);
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
             if (isset($xmlDetail->Chrgs->TtlChrgsAndTaxAmt) && (string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt) {
345 345
                 $amount      = StringToUnits::convert((string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt);
346
-                $currency    = (string)$xmlDetail->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
346
+                $currency    = (string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
347 347
 
348 348
                 $charges->setTotalChargesAndTaxAmount(new Money($amount, new Currency($currency)));
349 349
             }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
                     if (isset($chargesRecord->Amt) && (string) $chargesRecord->Amt) {
359 359
                         $amount      = StringToUnits::convert((string) $chargesRecord->Amt);
360
-                        $currency    = (string)$chargesRecord->Amt['Ccy'];
360
+                        $currency    = (string) $chargesRecord->Amt['Ccy'];
361 361
 
362 362
                         if ((string) $chargesRecord->CdtDbtInd === 'DBIT') {
363 363
                             $amount = $amount * -1;
Please login to merge, or discard this patch.