Skip to content

Commit 56dd714

Browse files
committed
fix pipeline issues
1 parent d0c5c9a commit 56dd714

File tree

113 files changed

+231
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+231
-110
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ parameters:
1212
count: 1
1313
path: src/Client/HttpClient.php
1414

15-
-
16-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, array\<int\<0, max\>, float\|int\|string\> given\.$#'
17-
identifier: argument.type
18-
count: 1
19-
path: src/Crypt/EstV3PosCrypt.php
20-
21-
-
22-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, list\<float\|int\|string\> given\.$#'
23-
identifier: argument.type
24-
count: 1
25-
path: src/Crypt/EstV3PosCrypt.php
26-
2715
-
2816
message: '#^Default value of the parameter \#3 \$order \(array\{\}\) of method Mews\\Pos\\Crypt\\PosNetCrypt\:\:createHash\(\) is incompatible with type array\{amount\: int, currency\: string, id\: string\}\.$#'
2917
identifier: parameter.defaultValue
@@ -156,12 +144,6 @@ parameters:
156144
count: 1
157145
path: src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php
158146

159-
-
160-
message: '#^Property Mews\\Pos\\DataMapper\\ResponseDataMapper\\AbstractResponseDataMapper\:\:\$secureTypeMappings \(array\<string, ''3d''\|''3d_host''\|''3d_pay''\|''3d_pay_hosting''\|''regular''\>\) does not accept non\-empty\-array\<1\|2\|3\|string, ''3d''\|''3d_host''\|''3d_pay''\|''3d_pay_hosting''\|''regular''\>\.$#'
161-
identifier: assign.propertyType
162-
count: 1
163-
path: src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php
164-
165147
-
166148
message: '#^Method Mews\\Pos\\Factory\\PosFactory\:\:createPosGateway\(\) should return Mews\\Pos\\PosInterface but returns object\.$#'
167149
identifier: return.type

src/Crypt/AbstractCrypt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function buildHashString(array $data, array $paramNames, string $separ
9696
$paramsVal = \implode($separator, $this->buildHashData($data, $paramNames));
9797

9898
if (null !== $storeKey) {
99-
$paramsVal = $this->concatenateHashKey($storeKey, $paramsVal);
99+
return $this->concatenateHashKey($storeKey, $paramsVal);
100100
}
101101

102102
return $paramsVal;

src/DataMapper/RequestDataMapper/AbstractRequestDataMapper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
abstract class AbstractRequestDataMapper implements RequestDataMapperInterface
1919
{
2020
protected EventDispatcherInterface $eventDispatcher;
21+
2122
protected RequestValueMapperInterface $valueMapper;
23+
2224
protected RequestValueFormatterInterface $valueFormatter;
25+
2326
protected CryptInterface $crypt;
2427

2528
protected bool $testMode = false;

src/DataMapper/RequestValueFormatter/ToslaPosRequestValueFormatter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function formatDateTime(\DateTimeInterface $dateTime, string $fieldName =
5555
if ('timeSpan' === $fieldName) {
5656
return $dateTime->format('YmdHis');
5757
}
58+
5859
if ('transactionDate' === $fieldName) {
5960
return $dateTime->format('Ymd');
6061
}

src/DataMapper/RequestValueMapper/AbstractRequestValueMapper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function getSecureTypeMappings(): array
8686
*/
8787
public function mapSecureType(string $paymentModel): string
8888
{
89-
if (0 === count($this->secureTypeMappings)) {
89+
if ([] === $this->secureTypeMappings) {
9090
throw new \LogicException('Security type mappings are not supported.');
9191
}
9292

@@ -122,7 +122,7 @@ public function getRecurringOrderFrequencyMappings(): array
122122
*/
123123
public function mapRecurringFrequency(string $period): string
124124
{
125-
if (0 === count($this->recurringOrderFrequencyMappings)) {
125+
if ([] === $this->recurringOrderFrequencyMappings) {
126126
throw new \LogicException('Recurring frequency mappings are not supported.');
127127
}
128128

@@ -134,7 +134,7 @@ public function mapRecurringFrequency(string $period): string
134134
*/
135135
public function mapLang(string $lang): string
136136
{
137-
if (0 === count($this->langMappings)) {
137+
if ([] === $this->langMappings) {
138138
throw new \LogicException('Language mappings are not supported.');
139139
}
140140

@@ -162,7 +162,7 @@ public function getCardTypeMappings(): array
162162
*/
163163
public function mapCardType(string $cardType): string
164164
{
165-
if (0 === count($this->cardTypeMappings)) {
165+
if ([] === $this->cardTypeMappings) {
166166
throw new \LogicException('Card type mappings are not supported.');
167167
}
168168

src/DataMapper/ResponseDataMapper/GarantiPosResponseDataMapper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ private function mapSingleOrderHistoryTransaction(array $rawTx): array
517517
if (null !== $transTime) {
518518
$defaultResponse['transaction_time'] = $this->valueFormatter->formatDateTime($transTime, $txType);
519519
}
520+
520521
$defaultResponse['capture_time'] = null !== $rawTx['AuthDate'] ? $this->valueFormatter->formatDateTime($rawTx['AuthDate'], $txType) : null;
521522
$amount = $rawTx['AuthAmount'];
522523
$defaultResponse['capture_amount'] = null !== $amount ? $this->valueFormatter->formatAmount($amount, $txType) : null;

src/DataMapper/ResponseValueFormatter/AbstractResponseValueFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
2+
23
/**
34
* @license MIT
45
*/
6+
57
namespace Mews\Pos\DataMapper\ResponseValueFormatter;
68

79
class AbstractResponseValueFormatter implements ResponseValueFormatterInterface

src/DataMapper/ResponseValueFormatter/BasicResponseValueFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
2+
23
/**
34
* @license MIT
45
*/
6+
57
namespace Mews\Pos\DataMapper\ResponseValueFormatter;
68

79
class BasicResponseValueFormatter extends AbstractResponseValueFormatter

src/DataMapper/ResponseValueFormatter/BoaPosResponseValueFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
2+
23
/**
34
* @license MIT
45
*/
6+
57
namespace Mews\Pos\DataMapper\ResponseValueFormatter;
68

79
use Mews\Pos\PosInterface;

src/DataMapper/ResponseValueFormatter/EstPosResponseValueFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
2+
23
/**
34
* @license MIT
45
*/
6+
57
namespace Mews\Pos\DataMapper\ResponseValueFormatter;
68

79
use Mews\Pos\PosInterface;

0 commit comments

Comments
 (0)