From 1303cf6be41cb76810fe4ba336a426c63a6f6697 Mon Sep 17 00:00:00 2001 From: sunaoka Date: Wed, 20 May 2026 18:11:30 +0900 Subject: [PATCH] Deprecated "${var}" has been changed to "{$var}" --- src/Client.php | 2 +- src/Controllers/Payment.php | 2 +- src/core/ClientControllerException.php | 2 +- src/core/Model.php | 4 ++-- tests/CoreClassesTest.php | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Client.php b/src/Client.php index 9a12e62..457f51c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -102,7 +102,7 @@ public function __construct($auth = null, $productionmode = false, $requestHandl $toStg = !$productionmode ? '-stg' : ''; $toStg = $productionmode === 'test' ? '-test' : $toStg; $toStg = $productionmode === 'perfMode' ? '-perf' : $toStg; - $this->config = require(__DIR__ . "/conf/config${toStg}.php"); + $this->config = require(__DIR__ . "/conf/config{$toStg}.php"); $this->endpoints = require(__DIR__ . '/conf/endpoints.php'); $this->apiMappings = require(__DIR__ . '/conf/apiMappings.php'); $this->versions = require(__DIR__ . '/conf/apiVersions.php'); diff --git a/src/Controllers/Payment.php b/src/Controllers/Payment.php index ebe81ed..2769782 100644 --- a/src/Controllers/Payment.php +++ b/src/Controllers/Payment.php @@ -265,7 +265,7 @@ private function endpointByPaymentType($paymentType, $merchantPaymentId) switch ($paymentType) { case 'pending': $version = $this->main()->GetEndpointVersion('REQUEST_ORDER'); - $endpoint = "/${version}" . $main->GetEndpoint('REQUEST_ORDER') . "/$merchantPaymentId"; + $endpoint = "/{$version}" . $main->GetEndpoint('REQUEST_ORDER') . "/$merchantPaymentId"; $url = $this->api_url . $main->GetEndpoint('REQUEST_ORDER') . "/$merchantPaymentId"; $url = str_replace('v2', $version, $url); break; diff --git a/src/core/ClientControllerException.php b/src/core/ClientControllerException.php index c4ae3b7..bfad2eb 100644 --- a/src/core/ClientControllerException.php +++ b/src/core/ClientControllerException.php @@ -42,6 +42,6 @@ public function getResolutionUrl() $code = $resultInfo["code"]; $codeId = $resultInfo["codeId"]; $apiName = $this->apiInfo["api_name"]; - return "${documentationUrl}?api_name=${apiName}&code=${code}&code_id=${codeId}"; + return "{$documentationUrl}?api_name={$apiName}&code={$code}&code_id={$codeId}"; } } diff --git a/src/core/Model.php b/src/core/Model.php index c2bca11..681c410 100644 --- a/src/core/Model.php +++ b/src/core/Model.php @@ -38,10 +38,10 @@ public function validate($throwErrors = true) } if ($memberInfo['type'] === 'string') { if (strlen($member) < 1) { - throw new ModelException("${memberName} cannot be empty", 1, [$memberName]); + throw new ModelException("{$memberName} cannot be empty", 1, [$memberName]); } if (isset($memberInfo['strlen']) && $memberInfo['strlen'] !== 0 && strlen($member) > $memberInfo['strlen']) { - throw new ModelException("${memberName} exceeds maximum size of characters", 1, [$memberName]); + throw new ModelException("{$memberName} exceeds maximum size of characters", 1, [$memberName]); } } } diff --git a/tests/CoreClassesTest.php b/tests/CoreClassesTest.php index 4599639..9fc4405 100644 --- a/tests/CoreClassesTest.php +++ b/tests/CoreClassesTest.php @@ -32,7 +32,7 @@ public function testClientBaExtNwClient() $collector["ENDPOINT_VERSION"] = $client->GetEndpointVersion('SUBSCRIPTION'); $collector["MERCHANT_ID"] = $client->GetMid(); foreach ($collector as $key => $value) { - $this->assertNotNull($value, "${key} invalid"); + $this->assertNotNull($value, "{$key} invalid"); } } public function testClientBadNwClient() @@ -68,7 +68,7 @@ public function testClientStaging() $collector["ENDPOINT_VERSION"] = $client->GetEndpointVersion('SUBSCRIPTION'); $collector["MERCHANT_ID"] = $client->GetMid(); foreach ($collector as $key => $value) { - $this->assertNotNull($value, "${key} invalid"); + $this->assertNotNull($value, "{$key} invalid"); } } public function testClientProduction() @@ -87,7 +87,7 @@ public function testClientProduction() $collector["ENDPOINT_VERSION"] = $client->GetEndpointVersion('SUBSCRIPTION'); $collector["MERCHANT_ID"] = $client->GetMid(); foreach ($collector as $key => $value) { - $this->assertNotNull($value, "${key} invalid"); + $this->assertNotNull($value, "{$key} invalid"); } } public function testClientTestMode() @@ -106,7 +106,7 @@ public function testClientTestMode() $collector["ENDPOINT_VERSION"] = $client->GetEndpointVersion('SUBSCRIPTION'); $collector["MERCHANT_ID"] = $client->GetMid(); foreach ($collector as $key => $value) { - $this->assertNotNull($value, "${key} invalid"); + $this->assertNotNull($value, "{$key} invalid"); } } public function testClientNoMid()