Failed Conditions
Pull Request — master (#92)
by
unknown
03:25
created
src/Camt054/Decoder/Message.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,29 +57,29 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $account = null;
59 59
         if (isset($xmlRecord->Acct->Id->IBAN)) {
60
-            $account = new DTO\IbanAccount(new Iban((string)$xmlRecord->Acct->Id->IBAN));
60
+            $account = new DTO\IbanAccount(new Iban((string) $xmlRecord->Acct->Id->IBAN));
61 61
         } elseif (isset($xmlRecord->Acct->Id->BBAN)) {
62
-            $account = new DTO\BBANAccount((string)$xmlRecord->Acct->Id->BBAN);
62
+            $account = new DTO\BBANAccount((string) $xmlRecord->Acct->Id->BBAN);
63 63
         } elseif (isset($xmlRecord->Acct->Id->UPIC)) {
64
-            $account = new DTO\UPICAccount((string)$xmlRecord->Acct->Id->UPIC);
64
+            $account = new DTO\UPICAccount((string) $xmlRecord->Acct->Id->UPIC);
65 65
         } elseif (isset($xmlRecord->Acct->Id->PrtryAcct)) {
66
-            $account = new DTO\ProprietaryAccount((string)$xmlRecord->Acct->Id->PrtryAcct->Id);
66
+            $account = new DTO\ProprietaryAccount((string) $xmlRecord->Acct->Id->PrtryAcct->Id);
67 67
         } elseif (isset($xmlRecord->Acct->Id->Othr)) {
68 68
             $xmlOtherIdentification = $xmlRecord->Acct->Id->Othr;
69
-            $account = new DTO\OtherAccount((string)$xmlOtherIdentification->Id);
69
+            $account = new DTO\OtherAccount((string) $xmlOtherIdentification->Id);
70 70
 
71 71
             if (isset($xmlOtherIdentification->SchmeNm)) {
72 72
                 if (isset($xmlOtherIdentification->SchmeNm->Cd)) {
73
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Cd);
73
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Cd);
74 74
                 }
75 75
 
76 76
                 if (isset($xmlOtherIdentification->SchmeNm->Prtry)) {
77
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Prtry);
77
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Prtry);
78 78
                 }
79 79
             }
80 80
 
81 81
             if (isset($xmlOtherIdentification->Issr)) {
82
-                $account->setIssuer((string)$xmlOtherIdentification->Issr);
82
+                $account->setIssuer((string) $xmlOtherIdentification->Issr);
83 83
             }
84 84
 
85 85
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 $this->accountAddServicerInfo($account, $xmlRecord->Acct->Svcr);
93 93
             }
94 94
             if ($xmlRecord->Acct->Ccy) {
95
-                $account->setCurrency(new \Money\Currency((string)$xmlRecord->Acct->Ccy));
95
+                $account->setCurrency(new \Money\Currency((string) $xmlRecord->Acct->Ccy));
96 96
             }
97 97
             return $account;
98 98
         }
Please login to merge, or discard this patch.
src/Camt053/Decoder/Message.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
         $xmlStatements = $this->getRootElement($document)->Stmt;
20 20
         foreach ($xmlStatements as $xmlStatement) {
21 21
             $statement = new Camt053DTO\Statement(
22
-                (string)$xmlStatement->Id,
23
-                $this->dateDecoder->decode((string)$xmlStatement->CreDtTm),
22
+                (string) $xmlStatement->Id,
23
+                $this->dateDecoder->decode((string) $xmlStatement->CreDtTm),
24 24
                 $this->getAccount($xmlStatement)
25 25
             );
26 26
 
27 27
             if (isset($xmlStatement->StmtPgntn)) {
28 28
                 $statement->setPagination(
29 29
                     new DTO\Pagination(
30
-                        (string)$xmlStatement->StmtPgntn->PgNb,
31
-                        ('true' === (string)$xmlStatement->StmtPgntn->LastPgInd) ? true : false
30
+                        (string) $xmlStatement->StmtPgntn->PgNb,
31
+                        ('true' === (string) $xmlStatement->StmtPgntn->LastPgInd) ? true : false
32 32
                     )
33 33
                 );
34 34
             }
35 35
 
36 36
             if (isset($xmlStatement->AddtlStmtInf)) {
37
-                $statement->setAdditionalInformation((string)$xmlStatement->AddtlStmtInf);
37
+                $statement->setAdditionalInformation((string) $xmlStatement->AddtlStmtInf);
38 38
             }
39 39
 
40 40
             $this->addCommonRecordInformation($statement, $xmlStatement);
@@ -59,23 +59,23 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $account = null;
61 61
         if (isset($xmlRecord->Acct->Id->IBAN)) {
62
-            $account = new DTO\IbanAccount(new Iban((string)$xmlRecord->Acct->Id->IBAN));
62
+            $account = new DTO\IbanAccount(new Iban((string) $xmlRecord->Acct->Id->IBAN));
63 63
         } else {
64 64
             $xmlOtherIdentification = $xmlRecord->Acct->Id->Othr;
65
-            $account = new DTO\OtherAccount((string)$xmlOtherIdentification->Id);
65
+            $account = new DTO\OtherAccount((string) $xmlOtherIdentification->Id);
66 66
 
67 67
             if (isset($xmlOtherIdentification->SchmeNm)) {
68 68
                 if (isset($xmlOtherIdentification->SchmeNm->Cd)) {
69
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Cd);
69
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Cd);
70 70
                 }
71 71
 
72 72
                 if (isset($xmlOtherIdentification->SchmeNm->Prtry)) {
73
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Prtry);
73
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Prtry);
74 74
                 }
75 75
             }
76 76
 
77 77
             if (isset($xmlOtherIdentification->Issr)) {
78
-                $account->setIssuer((string)$xmlOtherIdentification->Issr);
78
+                $account->setIssuer((string) $xmlOtherIdentification->Issr);
79 79
             }
80 80
         }
81 81
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 $this->accountAddServicerInfo($account, $xmlRecord->Acct->Svcr);
88 88
             }
89 89
             if ($xmlRecord->Acct->Ccy) {
90
-                $account->setCurrency(new \Money\Currency((string)$xmlRecord->Acct->Ccy));
90
+                $account->setCurrency(new \Money\Currency((string) $xmlRecord->Acct->Ccy));
91 91
             }
92 92
             return $account;
93 93
         }
Please login to merge, or discard this patch.
src/Camt052/Decoder/Message.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,22 +20,22 @@  discard block
 block discarded – undo
20 20
         $xmlReports = $this->getRootElement($document)->Rpt;
21 21
         foreach ($xmlReports as $xmlReport) {
22 22
             $report = new Camt052DTO\Report(
23
-                (string)$xmlReport->Id,
24
-                $this->dateDecoder->decode((string)$xmlReport->CreDtTm),
23
+                (string) $xmlReport->Id,
24
+                $this->dateDecoder->decode((string) $xmlReport->CreDtTm),
25 25
                 $this->getAccount($xmlReport)
26 26
             );
27 27
 
28 28
             if (isset($xmlReport->RptPgntn)) {
29 29
                 $report->setPagination(
30 30
                     new DTO\Pagination(
31
-                        (string)$xmlReport->RptPgntn->PgNb,
32
-                        ('true' === (string)$xmlReport->RptPgntn->LastPgInd) ? true : false
31
+                        (string) $xmlReport->RptPgntn->PgNb,
32
+                        ('true' === (string) $xmlReport->RptPgntn->LastPgInd) ? true : false
33 33
                     )
34 34
                 );
35 35
             }
36 36
 
37 37
             if (isset($xmlReport->AddtlRptInf)) {
38
-                $report->setAdditionalInformation((string)$xmlReport->AddtlRptInf);
38
+                $report->setAdditionalInformation((string) $xmlReport->AddtlRptInf);
39 39
             }
40 40
 
41 41
             $this->addCommonRecordInformation($report, $xmlReport);
@@ -52,29 +52,29 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $account = null;
54 54
         if (isset($xmlRecord->Acct->Id->IBAN)) {
55
-            $account = new DTO\IbanAccount(new Iban((string)$xmlRecord->Acct->Id->IBAN));
55
+            $account = new DTO\IbanAccount(new Iban((string) $xmlRecord->Acct->Id->IBAN));
56 56
         } elseif (isset($xmlRecord->Acct->Id->BBAN)) {
57
-            $account = new DTO\BBANAccount((string)$xmlRecord->Acct->Id->BBAN);
57
+            $account = new DTO\BBANAccount((string) $xmlRecord->Acct->Id->BBAN);
58 58
         } elseif (isset($xmlRecord->Acct->Id->UPIC)) {
59
-            $account = new DTO\UPICAccount((string)$xmlRecord->Acct->Id->UPIC);
59
+            $account = new DTO\UPICAccount((string) $xmlRecord->Acct->Id->UPIC);
60 60
         } elseif (isset($xmlRecord->Acct->Id->PrtryAcct)) {
61
-            $account = new DTO\ProprietaryAccount((string)$xmlRecord->Acct->Id->PrtryAcct->Id);
61
+            $account = new DTO\ProprietaryAccount((string) $xmlRecord->Acct->Id->PrtryAcct->Id);
62 62
         } elseif (isset($xmlRecord->Acct->Id->Othr)) {
63 63
             $xmlOtherIdentification = $xmlRecord->Acct->Id->Othr;
64
-            $account = new DTO\OtherAccount((string)$xmlOtherIdentification->Id);
64
+            $account = new DTO\OtherAccount((string) $xmlOtherIdentification->Id);
65 65
 
66 66
             if (isset($xmlOtherIdentification->SchmeNm)) {
67 67
                 if (isset($xmlOtherIdentification->SchmeNm->Cd)) {
68
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Cd);
68
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Cd);
69 69
                 }
70 70
 
71 71
                 if (isset($xmlOtherIdentification->SchmeNm->Prtry)) {
72
-                    $account->setSchemeName((string)$xmlOtherIdentification->SchmeNm->Prtry);
72
+                    $account->setSchemeName((string) $xmlOtherIdentification->SchmeNm->Prtry);
73 73
                 }
74 74
             }
75 75
 
76 76
             if (isset($xmlOtherIdentification->Issr)) {
77
-                $account->setIssuer((string)$xmlOtherIdentification->Issr);
77
+                $account->setIssuer((string) $xmlOtherIdentification->Issr);
78 78
             }
79 79
         }
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 $this->accountAddServicerInfo($account, $xmlRecord->Acct->Svcr);
87 87
             }
88 88
             if ($xmlRecord->Acct->Ccy) {
89
-                $account->setCurrency(new \Money\Currency((string)$xmlRecord->Acct->Ccy));
89
+                $account->setCurrency(new \Money\Currency((string) $xmlRecord->Acct->Ccy));
90 90
             }
91 91
             return $account;
92 92
         }
Please login to merge, or discard this patch.
test/Unit/Camt052/EndToEndTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                                 self::assertEquals('Company Name', $party->getRelatedPartyType()->getName());
250 250
                                 self::assertEquals('NL', $party->getRelatedPartyType()->getAddress()->getCountry());
251 251
                                 self::assertEquals([], $party->getRelatedPartyType()->getAddress()->getAddressLines());
252
-                                self::assertEquals('NL56AGDH9619008421', (string)$party->getAccount()->getIdentification());
252
+                                self::assertEquals('NL56AGDH9619008421', (string) $party->getAccount()->getIdentification());
253 253
                             } elseif ($party->getRelatedPartyType() instanceof DTO\Debtor) {
254 254
                                 self::assertEquals('NAME NAME', $party->getRelatedPartyType()->getName());
255 255
                                 self::assertEquals('NL', $party->getRelatedPartyType()->getAddress()->getCountry());
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                                     ['ADDR ADDR 10', '2000 ANTWERPEN'],
258 258
                                     $party->getRelatedPartyType()->getAddress()->getAddressLines()
259 259
                                 );
260
-                                self::assertEquals('NL56AGDH9619008421', (string)$party->getAccount()->getIdentification());
260
+                                self::assertEquals('NL56AGDH9619008421', (string) $party->getAccount()->getIdentification());
261 261
                             }
262 262
                         }
263 263
                     }
Please login to merge, or discard this patch.
src/Decoder/Message.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $owner = new DTO\AccountOwner();
84 84
         if ($Id = data_get($acctOwnrElement, 'Id.OrgId.Othr.Id')) {
85
-            $owner->setId((string)$Id);
85
+            $owner->setId((string) $Id);
86 86
         }
87 87
         if ($Id = data_get($acctOwnrElement, 'Id.PrvtId.Othr.Id')) {
88
-            $owner->setId((string)$Id);
88
+            $owner->setId((string) $Id);
89 89
         }
90 90
         if ($Nm = data_get($acctOwnrElement, 'Nm')) {
91
-            $owner->setName((string)$Nm);
91
+            $owner->setName((string) $Nm);
92 92
         }
93 93
         if ($PstlAdr = data_get($acctOwnrElement, 'PstlAdr')) {
94 94
             $address = \Genkgo\Camt\Decoder\Factory\DTO\Address::createFromXml($PstlAdr);
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $servicer = new DTO\AccountServicer();
103 103
         if ($Id = data_get($acctSvcrElement, 'FinInstnId.Othr.Id')) {
104
-            $servicer->setId((string)$id);
104
+            $servicer->setId((string) $id);
105 105
         }
106 106
         if ($BIC = data_get($acctSvcrElement, 'FinInstnId.BIC')) {
107
-            $servicer->setBic((string)$BIC);
107
+            $servicer->setBic((string) $BIC);
108 108
         }
109 109
         if ($Nm = data_get($acctSvcrElement, 'FinInstnId.Nm')) {
110
-            $servicer->setName((string)$Nm);
110
+            $servicer->setName((string) $Nm);
111 111
         }
112 112
         if ($Cd = data_get($acctSvcrElement, 'FinInstnId.Othr.SchmeNm.Cd')) {
113
-            $servicer->setSchmeNm((string)$Cd);
113
+            $servicer->setSchmeNm((string) $Cd);
114 114
         }
115 115
 
116 116
         if ($PstlAdr = data_get($acctSvcrElement, 'FinInstnId.PstlAdr')) {
Please login to merge, or discard this patch.
src/Decoder/EntryTransactionDetail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@
 block discarded – undo
110 110
             $relatedPartyType->setAddress(DTOFactory\Address::createFromXml($xmlRelatedPartyType->PstlAdr));
111 111
         }
112 112
         if ($Id = data_get($xmlRelatedPartyType, 'Id.PrvtId.Othr.Id')) {
113
-            $relatedPartyType->setId((string)$Id);
113
+            $relatedPartyType->setId((string) $Id);
114 114
         }
115 115
         if ($Cd = data_get($xmlRelatedPartyType, 'Id.PrvtId.Othr.SchmeNm.Cd')) {
116
-            $relatedPartyType->setTypeName((string)$Cd);
116
+            $relatedPartyType->setTypeName((string) $Cd);
117 117
         }
118 118
 
119 119
         $relatedParty = new RelatedParty($relatedPartyType, $this->getRelatedPartyAccount($xmlRelatedPartyTypeAccount));
Please login to merge, or discard this patch.