Skip to content

Commit e278887

Browse files
[reformat][adyen-sdk-automation] automated change
1 parent a6a0ccd commit e278887

File tree

202 files changed

+19926
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+19926
-921
lines changed

src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function getId()
409409
/**
410410
* Sets id
411411
*
412-
* @param string $id Unique identifier of the authentication.
412+
* @param string $id The unique identifier of the authentication.
413413
*
414414
* @return self
415415
*/
@@ -433,7 +433,7 @@ public function getPaymentInstrumentId()
433433
/**
434434
* Sets paymentInstrumentId
435435
*
436-
* @param string $paymentInstrumentId Unique identifier of the payment instrument that was used for the authentication.
436+
* @param string $paymentInstrumentId The unique identifier of the payment instrument that was used for the authentication.
437437
*
438438
* @return self
439439
*/

src/Adyen/Model/AcsWebhooks/ObjectSerializer.php

Lines changed: 2 additions & 28 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,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}
@@ -237,30 +235,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
237235
}
238236
}
239237

240-
if ($class === '\SplFileObject') {
241-
$data = Utils::streamFor($data);
242-
243-
/** @var \Psr\Http\Message\StreamInterface $data */
244-
245-
// determine file name
246-
if (is_array($httpHeaders)
247-
&& array_key_exists('Content-Disposition', $httpHeaders)
248-
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
249-
) {
250-
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
251-
} else {
252-
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
253-
}
254-
255-
$file = fopen($filename, 'w');
256-
while ($chunk = $data->read(200)) {
257-
fwrite($file, $chunk);
258-
}
259-
fclose($file);
260-
261-
return new \SplFileObject($filename, 'r');
262-
}
263-
264238
/** @psalm-suppress ParadoxicalCondition */
265239
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
266240
settype($data, $class);

src/Adyen/Model/AcsWebhooks/PurchaseInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function getDate()
309309
/**
310310
* Sets date
311311
*
312-
* @param string $date Date of the purchase.
312+
* @param string $date The date of the purchase.
313313
*
314314
* @return self
315315
*/
@@ -333,7 +333,7 @@ public function getMerchantName()
333333
/**
334334
* Sets merchantName
335335
*
336-
* @param string $merchantName Name of the merchant.
336+
* @param string $merchantName The name of the business that the cardholder purchased from.
337337
*
338338
* @return self
339339
*/

src/Adyen/Model/BalanceControl/ObjectSerializer.php

Lines changed: 2 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,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}

0 commit comments

Comments
 (0)