bavix/laravel-wallet

View on GitHub
src/Traits/CartPay.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

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

    public function refundCart(CartInterface $cart, bool $force = false, bool $gifts = false): bool
    {
        return app(AtomicServiceInterface::class)->block($this, function () use ($cart, $force, $gifts) {
            $basketDto = $cart->getBasketDto();
            app(EagerLoaderServiceInterface::class)->loadWalletsByBasket($this, $basketDto);
Severity: Minor
Found in src/Traits/CartPay.php - About 1 hr to fix

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

        public function payCart(CartInterface $cart, bool $force = false): array
        {
            return app(AtomicServiceInterface::class)->block($this, function () use ($cart, $force) {
                $basketDto = $cart->getBasketDto();
                $basketService = app(BasketServiceInterface::class);
    Severity: Minor
    Found in src/Traits/CartPay.php - About 1 hr to fix

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

          public function payFreeCart(CartInterface $cart): array
          {
              return app(AtomicServiceInterface::class)->block($this, function () use ($cart) {
                  $basketDto = $cart->getBasketDto();
                  $basketService = app(BasketServiceInterface::class);
      Severity: Minor
      Found in src/Traits/CartPay.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status