Failed Conditions
Push — master ( 40aca8...9b8515 )
by Adrien
01:48
created
src/Camt053/Decoder/Message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         foreach ($xmlStatements as $xmlStatement) {
23 23
             $statement = new Camt053DTO\Statement(
24 24
                 (string) $xmlStatement->Id,
25
-                $this->dateDecoder->decode((string)$xmlStatement->CreDtTm),
25
+                $this->dateDecoder->decode((string) $xmlStatement->CreDtTm),
26 26
                 $this->getAccount($xmlStatement)
27 27
             );
28 28
 
Please login to merge, or discard this patch.
src/Util/StringToUnits.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $digits = "(?P<digits>\d*)";
23 23
         $separator = "(?P<separator>[.,])?";
24 24
         $decimals = "(?P<decimal1>\d)?(?P<decimal2>\d)?(?P<remaining_decimals>\d)*";
25
-        $pattern = "/^".$sign.$digits.$separator.$decimals."$/";
25
+        $pattern = "/^" . $sign . $digits . $separator . $decimals . "$/";
26 26
 
27 27
         if (!preg_match($pattern, trim($string), $matches)) {
28 28
             throw new InvalidArgumentException("The value could not be parsed as money");
Please login to merge, or discard this patch.
src/Camt054/Decoder/Message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         foreach ($xmlNotifications as $xmlNotification) {
23 23
             $notification = new Camt054DTO\Notification(
24 24
                 (string) $xmlNotification->Id,
25
-                $this->dateDecoder->decode((string)$xmlNotification->CreDtTm),
25
+                $this->dateDecoder->decode((string) $xmlNotification->CreDtTm),
26 26
                 $this->getAccount($xmlNotification)
27 27
             );
28 28
 
Please login to merge, or discard this patch.
src/Camt054/Decoder/EntryTransactionDetail.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,32 +20,32 @@
 block discarded – undo
20 20
             }
21 21
 
22 22
             if (isset($xmlRelatedPartyTypeAccount->Id->IBAN)) {
23
-                return new DTO\IbanAccount(new Iban((string)$xmlRelatedPartyTypeAccount->Id->IBAN));
23
+                return new DTO\IbanAccount(new Iban((string) $xmlRelatedPartyTypeAccount->Id->IBAN));
24 24
             }
25 25
 
26 26
             if (isset($xmlRelatedPartyTypeAccount->Id->BBAN)) {
27
-                return new DTO\BBANAccount((string)$xmlRelatedPartyTypeAccount->Id->BBAN);
27
+                return new DTO\BBANAccount((string) $xmlRelatedPartyTypeAccount->Id->BBAN);
28 28
             }
29 29
 
30 30
             if (isset($xmlRelatedPartyTypeAccount->Id->UPIC)) {
31
-                return new DTO\UPICAccount((string)$xmlRelatedPartyTypeAccount->Id->UPIC);
31
+                return new DTO\UPICAccount((string) $xmlRelatedPartyTypeAccount->Id->UPIC);
32 32
             }
33 33
 
34 34
             if (isset($xmlRelatedPartyTypeAccount->Id->PrtryAcct)) {
35
-                return new DTO\ProprietaryAccount((string)$xmlRelatedPartyTypeAccount->Id->PrtryAcct->Id);
35
+                return new DTO\ProprietaryAccount((string) $xmlRelatedPartyTypeAccount->Id->PrtryAcct->Id);
36 36
             }
37 37
 
38 38
             if (isset($xmlRelatedPartyTypeAccount->Id->Othr)) {
39 39
                 $xmlOtherIdentification = $xmlRelatedPartyTypeAccount->Id->Othr;
40
-                $otherAccount           = new DTO\OtherAccount((string)$xmlOtherIdentification->Id);
40
+                $otherAccount           = new DTO\OtherAccount((string) $xmlOtherIdentification->Id);
41 41
 
42 42
                 if (isset($xmlOtherIdentification->SchmeNm)) {
43 43
                     if (isset($xmlOtherIdentification->SchmeNm->Cd)) {
44
-                        $otherAccount->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Cd);
44
+                        $otherAccount->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Cd);
45 45
                     }
46 46
 
47 47
                     if (isset($xmlOtherIdentification->SchmeNm->Prtry)) {
48
-                        $otherAccount->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Prtry);
48
+                        $otherAccount->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Prtry);
49 49
                     }
50 50
                 }
51 51
 
Please login to merge, or discard this patch.
src/Camt054/Decoder/V04/Message.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
     {
18 18
         $xmlGroupHeader = $this->getRootElement($document)->GrpHdr;
19 19
         $groupHeader = new Camt054V04DTO\GroupHeader(
20
-            (string)$xmlGroupHeader->MsgId,
21
-            $this->dateDecoder->decode((string)$xmlGroupHeader->CreDtTm)
20
+            (string) $xmlGroupHeader->MsgId,
21
+            $this->dateDecoder->decode((string) $xmlGroupHeader->CreDtTm)
22 22
         );
23 23
 
24 24
         if (isset($xmlGroupHeader->OrgnlBizQry)) {
Please login to merge, or discard this patch.
src/Camt052/Decoder/Message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         foreach ($xmlReports as $xmlReport) {
23 23
             $report = new Camt052DTO\Report(
24 24
                 (string) $xmlReport->Id,
25
-                $this->dateDecoder->decode((string)$xmlReport->CreDtTm),
25
+                $this->dateDecoder->decode((string) $xmlReport->CreDtTm),
26 26
                 $this->getAccount($xmlReport)
27 27
             );
28 28
 
Please login to merge, or discard this patch.
src/Decoder/Message.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
     {
37 37
         $xmlGroupHeader = $this->getRootElement($document)->GrpHdr;
38 38
         $groupHeader = new DTO\GroupHeader(
39
-            (string)$xmlGroupHeader->MsgId,
40
-            $this->dateDecoder->decode((string)$xmlGroupHeader->CreDtTm)
39
+            (string) $xmlGroupHeader->MsgId,
40
+            $this->dateDecoder->decode((string) $xmlGroupHeader->CreDtTm)
41 41
         );
42 42
 
43 43
         if (isset($xmlGroupHeader->AddtlInf)) {
Please login to merge, or discard this patch.
src/Decoder/Record.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $xmlBalances = $xmlRecord->Bal;
40 40
         foreach ($xmlBalances as $xmlBalance) {
41 41
             $amount = StringToUnits::convert((string) $xmlBalance->Amt);
42
-            $currency = (string)$xmlBalance->Amt['Ccy'];
43
-            $date = (string)$xmlBalance->Dt->Dt;
42
+            $currency = (string) $xmlBalance->Amt['Ccy'];
43
+            $date = (string) $xmlBalance->Dt->Dt;
44 44
 
45 45
             if ((string) $xmlBalance->CdtDbtInd === 'DBIT') {
46 46
                 $amount = $amount * -1;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $xmlEntries = $xmlRecord->Ntry;
81 81
         foreach ($xmlEntries as $xmlEntry) {
82 82
             $amount      = StringToUnits::convert((string) $xmlEntry->Amt);
83
-            $currency    = (string)$xmlEntry->Amt['Ccy'];
83
+            $currency    = (string) $xmlEntry->Amt['Ccy'];
84 84
             $bookingDate = ((string) $xmlEntry->BookgDt->Dt) ?: (string) $xmlEntry->BookgDt->DtTm;
85 85
             $valueDate   = ((string) $xmlEntry->ValDt->Dt) ?: (string) $xmlEntry->ValDt->DtTm;
86 86
             $additionalInfo = ((string) $xmlEntry->AddtlNtryInf) ?: (string) $xmlEntry->AddtlNtryInf;
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 
131 131
                 if (isset($xmlEntry->BkTxCd->Prtry)) {
132 132
                     $proprietaryBankTransactionCode = new DTO\ProprietaryBankTransactionCode(
133
-                        (string)$xmlEntry->BkTxCd->Prtry->Cd,
134
-                        (string)$xmlEntry->BkTxCd->Prtry->Issr
133
+                        (string) $xmlEntry->BkTxCd->Prtry->Cd,
134
+                        (string) $xmlEntry->BkTxCd->Prtry->Issr
135 135
                     );
136 136
 
137 137
                     $bankTransactionCode->setProprietary($proprietaryBankTransactionCode);
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 
140 140
                 if (isset($xmlEntry->BkTxCd->Domn)) {
141 141
                     $domainBankTransactionCode = new DTO\DomainBankTransactionCode(
142
-                        (string)$xmlEntry->BkTxCd->Domn->Cd
142
+                        (string) $xmlEntry->BkTxCd->Domn->Cd
143 143
                     );
144 144
 
145 145
                     if (isset($xmlEntry->BkTxCd->Domn->Fmly)) {
146 146
                         $domainFamilyBankTransactionCode = new DTO\DomainFamilyBankTransactionCode(
147
-                            (string)$xmlEntry->BkTxCd->Domn->Fmly->Cd,
148
-                            (string)$xmlEntry->BkTxCd->Domn->Fmly->SubFmlyCd
147
+                            (string) $xmlEntry->BkTxCd->Domn->Fmly->Cd,
148
+                            (string) $xmlEntry->BkTxCd->Domn->Fmly->SubFmlyCd
149 149
                         );
150 150
 
151 151
                         $domainBankTransactionCode->setFamily($domainFamilyBankTransactionCode);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
                 if (isset($xmlEntry->Chrgs->TtlChrgsAndTaxAmt) && (string) $xmlEntry->Chrgs->TtlChrgsAndTaxAmt) {
164 164
                     $amount      = StringToUnits::convert((string) $xmlEntry->Chrgs->TtlChrgsAndTaxAmt);
165
-                    $currency    = (string)$xmlEntry->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
165
+                    $currency    = (string) $xmlEntry->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
166 166
 
167 167
                     $charges->setTotalChargesAndTaxAmount(new Money($amount, new Currency($currency)));
168 168
                 }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
                         if (isset($chargesRecord->Amt) && (string) $chargesRecord->Amt) {
176 176
                             $amount      = StringToUnits::convert((string) $chargesRecord->Amt);
177
-                            $currency    = (string)$chargesRecord->Amt['Ccy'];
177
+                            $currency    = (string) $chargesRecord->Amt['Ccy'];
178 178
 
179 179
                             if ((string) $chargesRecord->CdtDbtInd === 'DBIT') {
180 180
                                 $amount = $amount * -1;
Please login to merge, or discard this patch.
src/Decoder/EntryTransactionDetail.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             if (isset($xmlRelatedParty->Cdtr)) {
77 77
                 $xmlRelatedPartyType = $xmlRelatedParty->Cdtr;
78 78
                 $xmlRelatedPartyTypeAccount = $xmlRelatedParty->CdtrAcct;
79
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
79
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
80 80
                 $relatedPartyType = $creditor = new DTO\Creditor($xmlRelatedPartyName);
81 81
 
82 82
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType, $xmlRelatedPartyTypeAccount);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             if (isset($xmlRelatedParty->UltmtCdtr)) {
86 86
                 $xmlRelatedPartyType = $xmlRelatedParty->UltmtCdtr;
87
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
87
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
88 88
                 $relatedPartyType = $creditor = new DTO\UltimateCreditor($xmlRelatedPartyName);
89 89
 
90 90
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             if (isset($xmlRelatedParty->Dbtr)) {
94 94
                 $xmlRelatedPartyType = $xmlRelatedParty->Dbtr;
95 95
                 $xmlRelatedPartyTypeAccount = $xmlRelatedParty->DbtrAcct;
96
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
96
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
97 97
                 $relatedPartyType = $debtor = new DTO\Debtor($xmlRelatedPartyName);
98 98
 
99 99
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType, $xmlRelatedPartyTypeAccount);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
             if (isset($xmlRelatedParty->UltmtDbtr)) {
103 103
                 $xmlRelatedPartyType = $xmlRelatedParty->UltmtDbtr;
104
-                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '' ;
104
+                $xmlRelatedPartyName = (isset($xmlRelatedPartyType->Nm)) ? (string) $xmlRelatedPartyType->Nm : '';
105 105
                 $relatedPartyType = $creditor = new DTO\UltimateDebtor($xmlRelatedPartyName);
106 106
 
107 107
                 $this->addRelatedParty($detail, $xmlRelatedPartyType, $relatedPartyType);
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
 
142 142
         foreach ($xmlDetail->RltdAgts as $xmlRelatedAgent) {
143 143
             if (isset($xmlRelatedAgent->CdtrAgt)) {
144
-                $agent = new DTO\CreditorAgent((string)$xmlRelatedAgent->CdtrAgt->FinInstnId->Nm, (string)$xmlRelatedAgent->CdtrAgt->FinInstnId->BIC);
145
-                $relatedAgent =  new DTO\RelatedAgent($agent);
144
+                $agent = new DTO\CreditorAgent((string) $xmlRelatedAgent->CdtrAgt->FinInstnId->Nm, (string) $xmlRelatedAgent->CdtrAgt->FinInstnId->BIC);
145
+                $relatedAgent = new DTO\RelatedAgent($agent);
146 146
                 $detail->addRelatedAgent($relatedAgent);
147 147
             }
148 148
 
149 149
             if (isset($xmlRelatedAgent->DbtrAgt)) {
150
-                $agent = new DTO\DebtorAgent((string)$xmlRelatedAgent->DbtrAgt->FinInstnId->Nm, (string)$xmlRelatedAgent->DbtrAgt->FinInstnId->BIC);
151
-                $relatedAgent =  new DTO\RelatedAgent($agent);
150
+                $agent = new DTO\DebtorAgent((string) $xmlRelatedAgent->DbtrAgt->FinInstnId->Nm, (string) $xmlRelatedAgent->DbtrAgt->FinInstnId->BIC);
151
+                $relatedAgent = new DTO\RelatedAgent($agent);
152 152
                 $detail->addRelatedAgent($relatedAgent);
153 153
             }
154 154
         }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         if ($xmlDetailsUnstructuredBlocks) {
173 173
             foreach ($xmlDetailsUnstructuredBlocks as $xmlDetailsUnstructuredBlock) {
174 174
                 $unstructuredRemittanceInformation = new DTO\UnstructuredRemittanceInformation(
175
-                    (string)$xmlDetailsUnstructuredBlock
175
+                    (string) $xmlDetailsUnstructuredBlock
176 176
                 );
177 177
 
178 178
                 $remittanceInformation->addUnstructuredBlock($unstructuredRemittanceInformation);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 if ($remittanceInformation->getMessage() === null) {
182 182
                     $unstructuredBlockExists = true;
183 183
                     $remittanceInformation->setMessage(
184
-                        (string)$xmlDetailsUnstructuredBlock
184
+                        (string) $xmlDetailsUnstructuredBlock
185 185
                     );
186 186
                 }
187 187
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
                 if (isset($xmlDetailsStructuredBlock->AddtlRmtInf)) {
197 197
                     $structuredRemittanceInformation->setAdditionalRemittanceInformation(
198
-                        (string)$xmlDetailsStructuredBlock->AddtlRmtInf
198
+                        (string) $xmlDetailsStructuredBlock->AddtlRmtInf
199 199
                     );
200 200
                 }
201 201
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
                     if (isset($xmlDetailsStructuredBlock->CdtrRefInf->Ref)) {
206 206
                         $creditorReferenceInformation->setRef(
207
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Ref
207
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Ref
208 208
                         );
209 209
                     }
210 210
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry)
213 213
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry)) {
214 214
                         $creditorReferenceInformation->setProprietary(
215
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry
215
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Prtry
216 216
                         );
217 217
                     }
218 218
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry)
221 221
                             && isset($xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd)) {
222 222
                         $creditorReferenceInformation->setCode(
223
-                            (string)$xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd
223
+                            (string) $xmlDetailsStructuredBlock->CdtrRefInf->Tp->CdOrPrtry->Cd
224 224
                         );
225 225
                     }
226 226
 
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
     {
269 269
         if (isset($xmlDetail->RtrInf) && isset($xmlDetail->RtrInf->Rsn->Cd)) {
270 270
             $remittanceInformation = DTO\ReturnInformation::fromUnstructured(
271
-                (string)$xmlDetail->RtrInf->Rsn->Cd,
272
-                (string)$xmlDetail->RtrInf->AddtlInf
271
+                (string) $xmlDetail->RtrInf->Rsn->Cd,
272
+                (string) $xmlDetail->RtrInf->AddtlInf
273 273
             );
274 274
             $detail->setReturnInformation($remittanceInformation);
275 275
         }
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 
303 303
             if (isset($xmlDetail->BkTxCd->Prtry)) {
304 304
                 $proprietaryBankTransactionCode = new DTO\ProprietaryBankTransactionCode(
305
-                    (string)$xmlDetail->BkTxCd->Prtry->Cd,
306
-                    (string)$xmlDetail->BkTxCd->Prtry->Issr
305
+                    (string) $xmlDetail->BkTxCd->Prtry->Cd,
306
+                    (string) $xmlDetail->BkTxCd->Prtry->Issr
307 307
                 );
308 308
 
309 309
                 $bankTransactionCode->setProprietary($proprietaryBankTransactionCode);
@@ -311,13 +311,13 @@  discard block
 block discarded – undo
311 311
 
312 312
             if (isset($xmlDetail->BkTxCd->Domn)) {
313 313
                 $domainBankTransactionCode = new DTO\DomainBankTransactionCode(
314
-                    (string)$xmlDetail->BkTxCd->Domn->Cd
314
+                    (string) $xmlDetail->BkTxCd->Domn->Cd
315 315
                 );
316 316
 
317 317
                 if (isset($xmlDetail->BkTxCd->Domn->Fmly)) {
318 318
                     $domainFamilyBankTransactionCode = new DTO\DomainFamilyBankTransactionCode(
319
-                        (string)$xmlDetail->BkTxCd->Domn->Fmly->Cd,
320
-                        (string)$xmlDetail->BkTxCd->Domn->Fmly->SubFmlyCd
319
+                        (string) $xmlDetail->BkTxCd->Domn->Fmly->Cd,
320
+                        (string) $xmlDetail->BkTxCd->Domn->Fmly->SubFmlyCd
321 321
                     );
322 322
 
323 323
                     $domainBankTransactionCode->setFamily($domainFamilyBankTransactionCode);
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 
342 342
             if (isset($xmlDetail->Chrgs->TtlChrgsAndTaxAmt) && (string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt) {
343 343
                 $amount      = StringToUnits::convert((string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt);
344
-                $currency    = (string)$xmlDetail->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
344
+                $currency    = (string) $xmlDetail->Chrgs->TtlChrgsAndTaxAmt['Ccy'];
345 345
 
346 346
                 $charges->setTotalChargesAndTaxAmount(new Money($amount, new Currency($currency)));
347 347
             }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
                     if (isset($chargesRecord->Amt) && (string) $chargesRecord->Amt) {
355 355
                         $amount      = StringToUnits::convert((string) $chargesRecord->Amt);
356
-                        $currency    = (string)$chargesRecord->Amt['Ccy'];
356
+                        $currency    = (string) $chargesRecord->Amt['Ccy'];
357 357
 
358 358
                         if ((string) $chargesRecord->CdtDbtInd === 'DBIT') {
359 359
                             $amount = $amount * -1;
Please login to merge, or discard this patch.