Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/ClientControllerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
}
}
4 changes: 2 additions & 2 deletions src/core/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/CoreClassesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down
Loading