Skip to content

Commit 614dc4a

Browse files
committed
Code formatting
1 parent 0aa353d commit 614dc4a

11 files changed

+23
-28
lines changed

src/Adyen/Model/Management/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8181
}
8282
}
8383
} else {
84-
foreach($data as $property => $value) {
84+
foreach ($data as $property => $value) {
8585
$values[$property] = self::sanitizeForSerialization($value);
8686
}
8787
}
@@ -117,7 +117,9 @@ public static function sanitizeFilename($filename)
117117
*/
118118
public static function sanitizeTimestamp($timestamp)
119119
{
120-
if (!is_string($timestamp)) return $timestamp;
120+
if (!is_string($timestamp)) {
121+
return $timestamp;
122+
}
121123

122124
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
123125
}
@@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null)
240242
/** @var \Psr\Http\Message\StreamInterface $data */
241243

242244
// determine file name
243-
if (
244-
is_array($httpHeaders)
245+
if (is_array($httpHeaders)
245246
&& array_key_exists('Content-Disposition', $httpHeaders)
246247
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
247248
) {

src/Adyen/Model/Payments/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8181
}
8282
}
8383
} else {
84-
foreach($data as $property => $value) {
84+
foreach ($data as $property => $value) {
8585
$values[$property] = self::sanitizeForSerialization($value);
8686
}
8787
}
@@ -117,7 +117,9 @@ public static function sanitizeFilename($filename)
117117
*/
118118
public static function sanitizeTimestamp($timestamp)
119119
{
120-
if (!is_string($timestamp)) return $timestamp;
120+
if (!is_string($timestamp)) {
121+
return $timestamp;
122+
}
121123

122124
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
123125
}
@@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null)
240242
/** @var \Psr\Http\Message\StreamInterface $data */
241243

242244
// determine file name
243-
if (
244-
is_array($httpHeaders)
245+
if (is_array($httpHeaders)
245246
&& array_key_exists('Content-Disposition', $httpHeaders)
246247
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
247248
) {

src/Adyen/Model/Payout/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8181
}
8282
}
8383
} else {
84-
foreach($data as $property => $value) {
84+
foreach ($data as $property => $value) {
8585
$values[$property] = self::sanitizeForSerialization($value);
8686
}
8787
}
@@ -117,7 +117,9 @@ public static function sanitizeFilename($filename)
117117
*/
118118
public static function sanitizeTimestamp($timestamp)
119119
{
120-
if (!is_string($timestamp)) return $timestamp;
120+
if (!is_string($timestamp)) {
121+
return $timestamp;
122+
}
121123

122124
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
123125
}
@@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null)
240242
/** @var \Psr\Http\Message\StreamInterface $data */
241243

242244
// determine file name
243-
if (
244-
is_array($httpHeaders)
245+
if (is_array($httpHeaders)
245246
&& array_key_exists('Content-Disposition', $httpHeaders)
246247
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
247248
) {

src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId,
6363
* @param string $apiCredentialId
6464
* @param string $originId
6565
* @param array|null $requestOptions
66-
66+
6767
* @throws AdyenException
6868
*/
6969
public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, ?array $requestOptions = null)
7070
{
7171
$endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}");
7272
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);
73-
7473
}
7574

7675
/**

src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId,
6363
* @param string $apiCredentialId
6464
* @param string $originId
6565
* @param array|null $requestOptions
66-
66+
6767
* @throws AdyenException
6868
*/
6969
public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, ?array $requestOptions = null)
7070
{
7171
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}");
7272
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);
73-
7473
}
7574

7675
/**

src/Adyen/Service/Management/MyAPICredentialApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,12 @@ public function getApiCredentialDetails(?array $requestOptions = null): \Adyen\M
116116
*
117117
* @param string $originId
118118
* @param array|null $requestOptions
119-
119+
120120
* @throws AdyenException
121121
*/
122122
public function removeAllowedOrigin(string $originId, ?array $requestOptions = null)
123123
{
124124
$endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}");
125125
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);
126-
127126
}
128127
}

src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ public function __construct(Client $client)
4646
* @param string $paymentMethodId
4747
* @param \Adyen\Model\Management\ApplePayInfo $applePayInfo
4848
* @param array|null $requestOptions
49-
49+
5050
* @throws AdyenException
5151
*/
5252
public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, ?array $requestOptions = null)
5353
{
5454
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains");
5555
$this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions);
56-
5756
}
5857

5958
/**

src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,13 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay
6161
* @param string $merchantId
6262
* @param string $payoutSettingsId
6363
* @param array|null $requestOptions
64-
64+
6565
* @throws AdyenException
6666
*/
6767
public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, ?array $requestOptions = null)
6868
{
6969
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}");
7070
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);
71-
7271
}
7372

7473
/**

src/Adyen/Service/Management/TerminalsTerminalLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ public function listTerminals(?array $requestOptions = null): \Adyen\Model\Manag
5959
* @param string $terminalId
6060
* @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest
6161
* @param array|null $requestOptions
62-
62+
6363
* @throws AdyenException
6464
*/
6565
public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, ?array $requestOptions = null)
6666
{
6767
$endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign");
6868
$this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions);
69-
7069
}
7170
}

src/Adyen/Service/Management/WebhooksCompanyLevelApi.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,13 @@ public function listAllWebhooks(string $companyId, ?array $requestOptions = null
9292
* @param string $companyId
9393
* @param string $webhookId
9494
* @param array|null $requestOptions
95-
95+
9696
* @throws AdyenException
9797
*/
9898
public function removeWebhook(string $companyId, string $webhookId, ?array $requestOptions = null)
9999
{
100100
$endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}");
101101
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);
102-
103102
}
104103

105104
/**

0 commit comments

Comments
 (0)