Skip to content

Commit d29353c

Browse files
committed
refactor: Remove duplicate constant definition and update type hints for response properties
1 parent c696f57 commit d29353c

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/Contexts/PaymentsContext.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class PaymentsContext extends BluemContext
2828

2929
public const PAYMENT_METHOD_BANCONTACT = 'Bancontact';
3030

31-
public const PAYMENT_METHOD_BANCONTACT = 'Bancontact';
32-
3331
public const PAYMENT_METHODS = [
3432
self::PAYMENT_METHOD_IDEAL,
3533
self::PAYMENT_METHOD_PAYPAL,

src/Requests/EmandateBluemRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Bluem\BluemPHP\Requests;
1111

1212
use Bluem\BluemPHP\Contexts\MandatesContext;
13+
use Bluem\BluemPHP\Constants;
1314
use Bluem\BluemPHP\Helpers\BluemConfiguration;
1415

1516
/**
@@ -90,7 +91,7 @@ public function __construct(BluemConfiguration $config, private $debtorReference
9091
$this->merchantID = $config->merchantID ?? "";
9192

9293
// override with hardcoded merchantID when in test environment, according to documentation
93-
if ($this->environment === BLUEM_ENVIRONMENT_TESTING) {
94+
if ($this->environment === Constants::TESTING_ENVIRONMENT) {
9495
$this->merchantID = "0020000387";
9596
}
9697

src/Responses/BluemResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020
class BluemResponse extends SimpleXMLElement implements BluemResponseInterface
2121
{
22-
public static string $response_primary_key = null;
22+
public static ?string $response_primary_key = null;
2323

24-
public static string $transaction_type = null;
24+
public static ?string $transaction_type = null;
2525

2626
public static ?string $error_response_type = null;
2727

src/Responses/MandateTransactionBluemResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
class MandateTransactionBluemResponse extends TransactionBluemResponse
1313
{
14-
public static string $transaction_type = "EMandate";
14+
public static ?string $transaction_type = "EMandate";
1515

16-
public static string $response_primary_key = 'EMandateTransaction';
16+
public static ?string $response_primary_key = 'EMandateTransaction';
1717

1818
public static ?string $error_response_type = 'EMandateErrorResponse';
1919

0 commit comments

Comments
 (0)