From 1879cd500af0caf2ad473cf96938d8ccf05c67e2 Mon Sep 17 00:00:00 2001 From: Frederik Rommel Date: Wed, 7 Feb 2024 08:56:13 +0100 Subject: [PATCH] RATESWSX-292: fix rector issues issues does only occurs on sw 6.5.x --- src/Components/DeviceFingerprint/DfpService.php | 2 +- src/Components/Logging/Service/ApiLogger.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/DeviceFingerprint/DfpService.php b/src/Components/DeviceFingerprint/DfpService.php index 3b105c2e..41affb94 100644 --- a/src/Components/DeviceFingerprint/DfpService.php +++ b/src/Components/DeviceFingerprint/DfpService.php @@ -74,7 +74,7 @@ public function isDfpIdValid(OrderEntity|SalesChannelContext $baseData, string $ $prefix = $this->getDfpPrefix($baseData); // verify if the prefix is at the beginning of the id - return str_starts_with($dfpId, $prefix); + return str_starts_with((string) $dfpId, $prefix); } public function getDfpSnippet(Request $request, OrderEntity|SalesChannelContext $baseData): ?string diff --git a/src/Components/Logging/Service/ApiLogger.php b/src/Components/Logging/Service/ApiLogger.php index 09c5d84b..e46533bf 100644 --- a/src/Components/Logging/Service/ApiLogger.php +++ b/src/Components/Logging/Service/ApiLogger.php @@ -78,7 +78,7 @@ public function logRequest(RequestDoneEvent $requestDoneEvent): void // remove sensitive data foreach (['securitycode', 'owner', 'iban'] as $key) { - $requestXml = preg_replace(sprintf('/<%s>(.*)<\/%s>/', $key, $key), sprintf('<%s>xxxxxxxx', $key, $key), $requestXml); + $requestXml = preg_replace(sprintf('/<%s>(.*)<\/%s>/', $key, $key), sprintf('<%s>xxxxxxxx', $key, $key), (string) $requestXml); } $reasonNode = $requestBuilder->getResponseXmlElement()->head->processing->reason;