Skip to content

Commit 94fc33e

Browse files
committed
Changed constructor
1 parent 3ef7f92 commit 94fc33e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Vault/Model/AbstractPaymentTokenFactory.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ public function __construct(
3636
ObjectManagerInterface $objectManager,
3737
PaymentTokenFactoryInterface $paymentTokenFactory = null
3838
) {
39+
if (!$paymentTokenFactory) {
40+
$paymentTokenFactory = $this->objectManager->get(PaymentTokenFactoryInterface::class);
41+
}
42+
3943
$this->objectManager = $objectManager;
40-
$this->paymentTokenFactory = $paymentTokenFactory ?: $this->objectManager->get(
41-
PaymentTokenFactoryInterface::class
42-
);
44+
$this->paymentTokenFactory = $paymentTokenFactory;
4345
}
4446

4547
/**

0 commit comments

Comments
 (0)