Skip to content

Commit bd8fb1d

Browse files
committed
Code formatting
1 parent 2328a59 commit bd8fb1d

13 files changed

+34
-38
lines changed

src/Adyen/Model/Management/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach($data as $property => $value) {
85+
foreach ($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,7 +118,9 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) return $timestamp;
121+
if (!is_string($timestamp)) {
122+
return $timestamp;
123+
}
122124

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

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

src/Adyen/Model/Payments/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach($data as $property => $value) {
85+
foreach ($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,7 +118,9 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) return $timestamp;
121+
if (!is_string($timestamp)) {
122+
return $timestamp;
123+
}
122124

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

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

src/Adyen/Model/Payout/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach($data as $property => $value) {
85+
foreach ($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,7 +118,9 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) return $timestamp;
121+
if (!is_string($timestamp)) {
122+
return $timestamp;
123+
}
122124

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

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

src/Adyen/Model/Recurring/ObjectSerializer.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach($data as $property => $value) {
85+
foreach ($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,7 +118,9 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) return $timestamp;
121+
if (!is_string($timestamp)) {
122+
return $timestamp;
123+
}
122124

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

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

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
}

0 commit comments

Comments
 (0)