Skip to content

Commit 07b246b

Browse files
authored
Merge pull request nemiah#509 from Philipp91/cs-fix
Fix most of the remaining CS fixer warnings/diffs
2 parents 1666012 + ebd2bbb commit 07b246b

29 files changed

+103
-104
lines changed

.php-cs-fixer.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212

1313
// But then we have some exclusions, i.e. we disable some of the checks/rules from Symfony:
1414
// Logic
15-
'yoda_style' => FALSE, // Allow both Yoda-style and regular comparisons.
15+
'yoda_style' => false, // Allow both Yoda-style and regular comparisons.
1616

1717
// Whitespace
18-
'blank_line_before_statement' => FALSE, // Don't put blank lines before `return` statements.
19-
'concat_space' => FALSE, // Allow spaces around string concatenation operator.
20-
'blank_line_after_opening_tag' => FALSE, // Allow file-level @noinspection suppressions to live on the `<?php` line.
21-
'single_line_throw' => FALSE, // Allow `throw` statements to span multiple lines.
18+
'blank_line_before_statement' => false, // Don't put blank lines before `return` statements.
19+
'concat_space' => false, // Allow spaces around string concatenation operator.
20+
'blank_line_after_opening_tag' => false, // Allow file-level @noinspection suppressions to live on the `<?php` line.
21+
'single_line_throw' => false, // Allow `throw` statements to span multiple lines.
2222

2323
// phpDoc
24-
'phpdoc_align' => FALSE, // Don't add spaces within phpDoc just to make parameter names / descriptions align.
25-
'phpdoc_annotation_without_dot' => FALSE, // Allow terminating dot on @param and such.
26-
'phpdoc_no_alias_tag' => FALSE, // Allow @link in addition to @see.
27-
'phpdoc_separation' => FALSE, // Don't put blank line between @params, @throws and @return.
28-
'phpdoc_summary' => FALSE, // Don't force terminating dot on the first line.
24+
'phpdoc_align' => false, // Don't add spaces within phpDoc just to make parameter names / descriptions align.
25+
'phpdoc_annotation_without_dot' => false, // Allow terminating dot on @param and such.
26+
'phpdoc_no_alias_tag' => false, // Allow @link in addition to @see.
27+
'phpdoc_separation' => false, // Don't put blank line between @params, @throws and @return.
28+
'phpdoc_summary' => false, // Don't force terminating dot on the first line.
2929
])
3030
->setFinder($finder);

lib/Fhp/Action/GetBalance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __unserialize(array $serialized): void
7979
{
8080
list(
8181
$parentSerialized,
82-
$this->account, $this->allAccounts
82+
$this->account, $this->allAccounts,
8383
) = $serialized;
8484

8585
is_array($parentSerialized) ?

lib/Fhp/Action/GetDepotAufstellung.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __unserialize(array $serialized): void
8181
{
8282
list(
8383
$parentSerialized,
84-
$this->account
84+
$this->account,
8585
) = $serialized;
8686

8787
is_array($parentSerialized) ?

lib/Fhp/Action/GetStatementOfAccount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function __unserialize(array $serialized): void
114114
list(
115115
$parentSerialized,
116116
$this->account, $this->from, $this->to, $this->allAccounts,
117-
$this->bankName
117+
$this->bankName,
118118
) = $serialized;
119119

120120
is_array($parentSerialized) ?

lib/Fhp/Action/GetStatementOfAccountXML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __unserialize(array $serialized): void
9898
{
9999
list(
100100
$parentSerialized,
101-
$this->account, $this->camtURN, $this->from, $this->to, $this->allAccounts
101+
$this->account, $this->camtURN, $this->from, $this->to, $this->allAccounts,
102102
) = $serialized;
103103

104104
is_array($parentSerialized) ?

lib/Fhp/Action/SendSEPADirectDebit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function __unserialize(array $serialized): void
114114
{
115115
list(
116116
$parentSerialized,
117-
$this->singleDirectDebit, $this->tryToUseControlSumForSingleTransactions, $this->ctrlSum, $this->coreType, $this->painMessage, $this->painNamespace, $this->account
117+
$this->singleDirectDebit, $this->tryToUseControlSumForSingleTransactions, $this->ctrlSum, $this->coreType, $this->painMessage, $this->painNamespace, $this->account,
118118
) = $serialized;
119119

120120
is_array($parentSerialized) ?
@@ -151,7 +151,7 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
151151
// Sometimes the Bank reports supported schemas with a "_GBIC_X" postfix.
152152
// GIBC_X stands for German Banking Industry Committee and a version counter.
153153
$xmlSchema = $this->painNamespace;
154-
$matchingSchemas = array_filter($supportedPainNamespaces, function($value) use ($xmlSchema) {
154+
$matchingSchemas = array_filter($supportedPainNamespaces, function ($value) use ($xmlSchema) {
155155
// For example urn:iso:std:iso:20022:tech:xsd:pain.008.001.08 from the xml matches
156156
// urn:iso:std:iso:20022:tech:xsd:pain.008.001.08_GBIC_4
157157
return str_starts_with($value, $xmlSchema);

lib/Fhp/Action/SendSEPARealtimeTransfer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
6969
// Sometimes the Bank reports supported schemas with a "_GBIC_X" postfix.
7070
// GIBC_X stands for German Banking Industry Committee and a version counter.
7171
$xmlSchema = $this->xmlSchema;
72-
$matchingSchemas = array_filter($supportedSchemas, function($value) use ($xmlSchema) {
72+
$matchingSchemas = array_filter($supportedSchemas, function ($value) use ($xmlSchema) {
7373
// For example urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 from the xml matches
7474
// urn:iso:std:iso:20022:tech:xsd:pain.001.001.09_GBIC_4
7575
return str_starts_with($value, $xmlSchema);
@@ -104,8 +104,8 @@ public function processResponse(Message $response)
104104
return;
105105
}
106106

107-
if ($response->findRueckmeldung(Rueckmeldungscode::ENTGEGENGENOMMEN) === null &&
108-
$response->findRueckmeldung(Rueckmeldungscode::AUSGEFUEHRT) === null) {
107+
if ($response->findRueckmeldung(Rueckmeldungscode::ENTGEGENGENOMMEN) === null
108+
&& $response->findRueckmeldung(Rueckmeldungscode::AUSGEFUEHRT) === null) {
109109
throw new UnexpectedResponseException('Bank did not confirm SEPATransfer execution');
110110
}
111111
}

lib/Fhp/Action/SendSEPATransfer.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static function create(SEPAAccount $account, string $painMessage): SendSE
4646

4747
protected function createRequest(BPD $bpd, ?UPD $upd)
4848
{
49-
//ANALYSE XML FOR RECEIPTS AND PAYMENT DATE
50-
$xmlAsObject = simplexml_load_string($this->painMessage, "SimpleXMLElement", LIBXML_NOCDATA);
49+
// ANALYSE XML FOR RECEIPTS AND PAYMENT DATE
50+
$xmlAsObject = simplexml_load_string($this->painMessage, 'SimpleXMLElement', LIBXML_NOCDATA);
5151
$numberOfTransactions = $xmlAsObject->CstmrCdtTrfInitn->GrpHdr->NbOfTxs;
5252
$hasReqdExDates = false;
5353
foreach ($xmlAsObject->CstmrCdtTrfInitn?->PmtInf as $pmtInfo) {
@@ -58,25 +58,21 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
5858
}
5959
}
6060

61-
//NOW READ OUT, WICH SEGMENT SHOULD BE USED:
61+
// NOW READ OUT, WICH SEGMENT SHOULD BE USED:
6262
if ($numberOfTransactions > 1 && $hasReqdExDates) {
63-
6463
// Terminierte SEPA-Sammelüberweisung (Segment HKCME / Kennung HICMES)
6564
$segmentID = 'HICMES';
6665
$segment = \Fhp\Segment\CME\HKCMEv1::createEmpty();
6766
} elseif ($numberOfTransactions == 1 && $hasReqdExDates) {
68-
6967
// Terminierte SEPA-Überweisung (Segment HKCSE / Kennung HICSES)
7068
$segmentID = 'HICSES';
7169
$segment = \Fhp\Segment\CSE\HKCSEv1::createEmpty();
7270
} elseif ($numberOfTransactions > 1 && !$hasReqdExDates) {
73-
7471
// SEPA-Sammelüberweisungen (Segment HKCCM / Kennung HICSES)
7572
$segmentID = 'HICSES';
7673
$segment = \Fhp\Segment\CCM\HKCCMv1::createEmpty();
7774
} else {
78-
79-
//SEPA Einzelüberweisung (Segment HKCCS / Kennung HICCSS).
75+
// SEPA Einzelüberweisung (Segment HKCCS / Kennung HICCSS).
8076
$segmentID = 'HICCSS';
8177
$segment = \Fhp\Segment\CCS\HKCCSv1::createEmpty();
8278
}
@@ -92,7 +88,7 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
9288
// Sometimes the Bank reports supported schemas with a "_GBIC_X" postfix.
9389
// GIBC_X stands for German Banking Industry Committee and a version counter.
9490
$xmlSchema = $this->xmlSchema;
95-
$matchingSchemas = array_filter($supportedSchemas, function($value) use ($xmlSchema) {
91+
$matchingSchemas = array_filter($supportedSchemas, function ($value) use ($xmlSchema) {
9692
// For example urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 from the xml matches
9793
// urn:iso:std:iso:20022:tech:xsd:pain.001.001.09_GBIC_4
9894
return str_starts_with($value, $xmlSchema);

lib/Fhp/BaseAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function __unserialize(array $serialized): void
106106
list(
107107
$this->requestSegmentNumbers,
108108
$this->tanRequest,
109-
$this->needTanForSegment
109+
$this->needTanForSegment,
110110
) = $serialized;
111111
}
112112

lib/Fhp/FinTs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private function loadPersistedInstanceVersion2(array $data)
226226
$this->selectedTanMedium,
227227
$this->kundensystemId,
228228
$this->dialogId,
229-
$this->messageNumber
229+
$this->messageNumber,
230230
) = $data;
231231
}
232232

@@ -571,7 +571,7 @@ public function forgetDialog()
571571
public function getTanModes(): array
572572
{
573573
$this->ensureTanModesAvailable();
574-
$result = array();
574+
$result = [];
575575
foreach ($this->allowedTanModes as $tanModeId) {
576576
if (!array_key_exists($tanModeId, $this->bpd->allTanModes)) continue;
577577
$result[$tanModeId] = $this->bpd->allTanModes[$tanModeId];

0 commit comments

Comments
 (0)