@@ -22,7 +22,7 @@ |
||
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 |
@@ -22,7 +22,7 @@ |
||
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"); |
@@ -22,7 +22,7 @@ |
||
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 |
@@ -17,8 +17,8 @@ |
||
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)) { |
@@ -22,7 +22,7 @@ |
||
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 |
@@ -36,8 +36,8 @@ |
||
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)) { |
@@ -39,8 +39,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } |
43 | 43 | if (isset($xmlAddress->AdrLine)) { |
44 | 44 | foreach ($xmlAddress->AdrLine as $line) { |
45 | - $address = $address->addAddressLine((string)$line); |
|
45 | + $address = $address->addAddressLine((string) $line); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function testReadFile() |
44 | 44 | { |
45 | 45 | $reader = new Reader(Config::getDefault()); |
46 | - $message = $reader->readFile(__DIR__.'/Camt053/Stubs/camt053.v2.minimal.xml'); |
|
46 | + $message = $reader->readFile(__DIR__ . '/Camt053/Stubs/camt053.v2.minimal.xml'); |
|
47 | 47 | $this->assertInstanceOf(DTO\Message::class, $message); |
48 | 48 | } |
49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $config->disableXsdValidation(); |
55 | 55 | |
56 | 56 | $reader = new Reader($config); |
57 | - $message = $reader->readFile(__DIR__.'/Camt053/Stubs/camt053.v2.minimal.xml'); |
|
57 | + $message = $reader->readFile(__DIR__ . '/Camt053/Stubs/camt053.v2.minimal.xml'); |
|
58 | 58 | $this->assertInstanceOf(DTO\Message::class, $message); |
59 | 59 | } |
60 | 60 | } |