Adapter
This commit is contained in:
@@ -18,4 +18,4 @@ class CashPayment implements PaymentInterface
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
dump("Cash payment success, amount: {$order->getSum()} ₴");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ class IngPayment implements PaymentInterface
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
dump("ING Bank payment success, amount: {$order->getSum()} ₴");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ class IngPaymentFactory implements PaymentFactoryInterface
|
||||
{
|
||||
return new IngPayment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ class OtpPayment implements PaymentInterface
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
dump("Otp Bank payment success, amount: {$order->getSum()} ₴");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ class OtpPaymentFactory implements PaymentFactoryInterface
|
||||
{
|
||||
return new OtpPayment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ namespace Pattern\Creational\FactoryMethod;
|
||||
interface PaymentInterface
|
||||
{
|
||||
public function pay(Order $order): void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ class PrivatPayment implements PaymentInterface
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
dump("Privatbank payment success, amount: {$order->getSum()} ₴");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ class RaiffeisenPayment implements PaymentInterface
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
dump("Raiffeisen Bank payment success, amount: {$order->getSum()} ₴");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ class RaiffeisenPaymentFactory implements PaymentFactoryInterface
|
||||
{
|
||||
return new RaiffeisenPayment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user