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 16, 2024
1 parent 0522cfb commit d5031f2
Show file tree
Hide file tree
Showing 197 changed files with 308 additions and 313 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
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ public function getTypeAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('accountType', $data ?? [], 'checking');
$this->setIfExists('accountType', $data ?? [], null);
$this->setIfExists('institutionNumber', $data ?? [], null);
$this->setIfExists('transitNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'caLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
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('bankCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'czLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Adyen/Model/BalancePlatform/CapabilitySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function getAmountPerIndustry()
/**
* Sets amountPerIndustry
*
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
*
* @return self
*/
Expand All @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers()
/**
* Sets authorizedCardUsers
*
* @param bool|null $authorizedCardUsers
* @param bool|null $authorizedCardUsers
*
* @return self
*/
Expand All @@ -412,7 +412,7 @@ public function getFundingSource()
/**
* Sets fundingSource
*
* @param string[]|null $fundingSource
* @param string[]|null $fundingSource
*
* @return self
*/
Expand Down Expand Up @@ -448,7 +448,7 @@ public function getInterval()
/**
* Sets interval
*
* @param string|null $interval
* @param string|null $interval
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function __construct(array $data = null)
$this->setIfExists('sweepAmount', $data ?? [], null);
$this->setIfExists('targetAmount', $data ?? [], null);
$this->setIfExists('triggerAmount', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'push');
$this->setIfExists('type', $data ?? [], null);
}

/**
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('bankCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'dkLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
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('clearingCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'hkLocal');
$this->setIfExists('type', $data ?? [], null);
}

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

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

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function getTypeAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'nzLocal');
$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('additionalBankIdentification', $data ?? [], null);
$this->setIfExists('bic', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'numberAndBic');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalancePlatform/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 @@ -250,7 +250,7 @@ public function getTypeAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'plLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->setIfExists('iban', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'usLocal');
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('accountType', $data ?? [], 'checking');
$this->setIfExists('accountType', $data ?? [], null);
$this->setIfExists('routingNumber', $data ?? [], null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function __construct(array $data = null)
$this->setIfExists('issuingCountryCode', $data ?? [], null);
$this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null);
$this->setIfExists('paymentInstrumentType', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement');
$this->setIfExists('type', $data ?? [], null);
}

/**
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('clearingNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'seLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
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('bic', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'sgLocal');
$this->setIfExists('type', $data ?? [], null);
}

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function __construct(array $data = null)
{
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('requiredAddressFields', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement');
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('max', $data ?? [], null);
$this->setIfExists('min', $data ?? [], null);
$this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null);
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('sortCode', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'ukLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ public function getTypeAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('accountType', $data ?? [], 'checking');
$this->setIfExists('accountType', $data ?? [], null);
$this->setIfExists('routingNumber', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'usLocal');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public function __construct(array $data = null)
$this->setIfExists('sweepAmount', $data ?? [], null);
$this->setIfExists('targetAmount', $data ?? [], null);
$this->setIfExists('triggerAmount', $data ?? [], null);
$this->setIfExists('type', $data ?? [], 'push');
$this->setIfExists('type', $data ?? [], null);
}

/**
Expand Down
Loading

0 comments on commit d5031f2

Please sign in to comment.