Skip to content

Commit

Permalink
[reformat][adyen-sdk-automation] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot committed Jan 26, 2024
1 parent 8237d15 commit eadb725
Show file tree
Hide file tree
Showing 222 changed files with 6,748 additions and 357 deletions.
9 changes: 4 additions & 5 deletions src/Adyen/Model/AcsWebhooks/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
}
}
} else {
foreach ($data as $property => $value) {
foreach($data as $property => $value) {
$values[$property] = self::sanitizeForSerialization($value);
}
}
Expand Down Expand Up @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename)
*/
public static function sanitizeTimestamp($timestamp)
{
if (!is_string($timestamp)) {
return $timestamp;
}
if (!is_string($timestamp)) return $timestamp;

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

// determine file name
if (is_array($httpHeaders)
if (
is_array($httpHeaders)
&& array_key_exists('Content-Disposition', $httpHeaders)
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
) {
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalanceControl/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
}
}
} else {
foreach ($data as $property => $value) {
foreach($data as $property => $value) {
$values[$property] = self::sanitizeForSerialization($value);
}
}
Expand Down Expand Up @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename)
*/
public static function sanitizeTimestamp($timestamp)
{
if (!is_string($timestamp)) {
return $timestamp;
}
if (!is_string($timestamp)) return $timestamp;

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

// determine file name
if (is_array($httpHeaders)
if (
is_array($httpHeaders)
&& array_key_exists('Content-Disposition', $httpHeaders)
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bsbCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'auLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/BalancePlatform/AddressRequirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function __construct(array $data = null)
{
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('requiredAddressFields', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'addressRequirement');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function __construct(array $data = null)
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('max', $data ?? [], null);
$this->setIfExists('min', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'amountMinMaxRequirement');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function __construct(array $data = null)
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bankCode', $data ?? [], null);
$this->setIfExists('branchNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'brLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bsbCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'usLocal');
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('bankCode', $data ?? [], null);
$this->setIfExists('branchNumber', $data ?? [], null);
$this->setIfExists('accountType', $data ?? [], 'checking');
$this->setIfExists('accountType', $data ?? [], null);
$this->setIfExists('institutionNumber', $data ?? [], null);
$this->setIfExists('transitNumber', $data ?? [], null);
$this->setIfExists('clearingCode', $data ?? [], null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function __construct(array $data = null)
{
$this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'bankAccountIdentificationTypeRequirement');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bsbCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'usLocal');
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('bankCode', $data ?? [], null);
$this->setIfExists('branchNumber', $data ?? [], null);
$this->setIfExists('accountType', $data ?? [], 'checking');
$this->setIfExists('accountType', $data ?? [], null);
$this->setIfExists('institutionNumber', $data ?? [], null);
$this->setIfExists('transitNumber', $data ?? [], null);
$this->setIfExists('clearingCode', $data ?? [], null);
Expand Down
Loading

0 comments on commit eadb725

Please sign in to comment.