We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 731bbdbc authored by acampos1916's avatar acampos1916

Fix for code smells

parent 1dc9d21c
......@@ -133,11 +133,15 @@ class VaultDetailsHandler implements HandlerInterface
*/
private function getVaultPaymentToken(array $response, $payment)
{
$paymentToken = null;
if (!empty($response['additionalData'])) {
if (empty($response['additionalData'])) {
return null;
}
$additionalData = $response['additionalData'];
$paymentToken = null;
foreach (self::ADDITIONAL_DATA_ERRORS as $key => $errorMsg) {
if (empty($additionalData[$key])) {
$this->adyenLogger->error($errorMsg);
......@@ -188,7 +192,6 @@ class VaultDetailsHandler implements HandlerInterface
} catch (\Exception $e) {
$this->adyenLogger->error(print_r($e, true));
}
}
return $paymentToken;
}
......@@ -198,8 +201,10 @@ class VaultDetailsHandler implements HandlerInterface
* @return string
* @throws \Exception
*/
private function getExpirationDate($expirationDate)
{
private
function getExpirationDate(
$expirationDate
) {
$expirationDate = explode('/', $expirationDate);
//add leading zero to month
......@@ -226,8 +231,10 @@ class VaultDetailsHandler implements HandlerInterface
* @param InfoInterface $payment
* @return OrderPaymentExtensionInterface
*/
private function getExtensionAttributes(InfoInterface $payment)
{
private
function getExtensionAttributes(
InfoInterface $payment
) {
$extensionAttributes = $payment->getExtensionAttributes();
if (null === $extensionAttributes) {
$extensionAttributes = $this->paymentExtensionFactory->create();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment