Skip to content

Commit

Permalink
depend on the abstract rather than implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
skoro committed Aug 27, 2024
1 parent 33e81c8 commit c38cc1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Command/PaymentGatewaysCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace App\Command;

use App\Payment\Common\GatewayInterface;
use App\Payment\PaymentGatewayRegistry;
use App\Payment\Common\PaymentGatewayRegistryInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
Expand All @@ -20,7 +20,7 @@
class PaymentGatewaysCommand extends Command
{
public function __construct(
private readonly PaymentGatewayRegistry $paymentGateways,
private readonly PaymentGatewayRegistryInterface $paymentGateways,
) {
parent::__construct();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Api/V1/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use App\Order\OrderTotalAmountCalculator;
use App\Order\Workflow\OrderWorkflowFactory;
use App\Payment\Common\Exception\PaymentGatewayIsNotRegisteredException;
use App\Payment\PaymentGatewayRegistryInterface;
use App\Payment\Common\PaymentGatewayRegistryInterface;
use App\Repository\OrderRepository;
use Doctrine\ORM\EntityManagerInterface;
use OpenApi\Attributes as OA;
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Api/V1/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use App\Event\PaymentStatusEvent;
use App\Order\Workflow\OrderWorkflowFactory;
use App\Payment\Common\GatewayInterface;
use App\Payment\PaymentGatewayRegistry;
use App\Payment\Common\PaymentGatewayRegistryInterface;
use Nelmio\ApiDocBundle\Annotation\Model;
use OpenApi\Attributes as OA;
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
Expand All @@ -28,7 +28,7 @@
class PaymentController extends AbstractController
{
public function __construct(
private readonly PaymentGatewayRegistry $paymentGatewayRegistry,
private readonly PaymentGatewayRegistryInterface $paymentGatewayRegistry,
private readonly EventDispatcherInterface $eventDispatcher,
) {
}
Expand Down

0 comments on commit c38cc1a

Please sign in to comment.