bavix/laravel-wallet

View on GitHub
src/Traits/CartPay.php

Summary

Maintainability
B
4 hrs
Test Coverage
A
100%

Method payCart has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    public function payCart(CartInterface $cart, bool $force = false): array
    {
        $atomicService = app(AtomicServiceInterface::class);
        $basketService = app(BasketServiceInterface::class);
        $availabilityAssembler = app(AvailabilityDtoAssemblerInterface::class);
Severity: Major
Found in src/Traits/CartPay.php - About 2 hrs to fix

    Method refundCart has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

        public function refundCart(CartInterface $cart, bool $force = false, bool $gifts = false): bool
        {
            // Get the required services.
            $atomicService = app(AtomicServiceInterface::class);
            $basketDto = $cart->getBasketDto();
    Severity: Major
    Found in src/Traits/CartPay.php - About 2 hrs to fix

      File CartPay.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
      Confirmed

      <?php
      
      declare(strict_types=1);
      
      namespace Bavix\Wallet\Traits;
      Severity: Minor
      Found in src/Traits/CartPay.php - About 2 hrs to fix

        Method payFreeCart has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function payFreeCart(CartInterface $cart): array
            {
                $atomicService = app(AtomicServiceInterface::class);
                $eagerLoaderService = app(EagerLoaderServiceInterface::class);
                $basketService = app(BasketServiceInterface::class);
        Severity: Minor
        Found in src/Traits/CartPay.php - About 2 hrs to fix

          There are no issues that match your filters.

          Category
          Status