Showing 15 of 27 total issues
File WalletServiceProvider.php
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
<?php
declare(strict_types=1);
namespace Bavix\Wallet;
Method forceExchange
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
Confirmed
public function forceExchange(Wallet $to, int|string $amount, ExtraDtoInterface|array|null $meta = null): Transfer
{
// Get the atomic service to execute the exchange operation as a single, indivisible action.
$atomicService = app(AtomicServiceInterface::class);
File CartPay.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
<?php
declare(strict_types=1);
namespace Bavix\Wallet\Traits;
Method services
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
Confirmed
private function services(array $configure, array $cache): void
{
$this->app->singleton(AssistantServiceInterface::class, $configure['assistant'] ?? AssistantService::class);
$this->app->singleton(AtmServiceInterface::class, $configure['atm'] ?? AtmService::class);
$this->app->singleton(AtomicServiceInterface::class, $configure['atomic'] ?? AtomicService::class);
Method payFreeCart
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function payFreeCart(CartInterface $cart): array
{
$atomicService = app(AtomicServiceInterface::class);
$eagerLoaderService = app(EagerLoaderServiceInterface::class);
$basketService = app(BasketServiceInterface::class);
Method assemblers
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
Confirmed
private function assemblers(array $configure): void
{
$this->app->singleton(
AvailabilityDtoAssemblerInterface::class,
$configure['availability'] ?? AvailabilityDtoAssembler::class
Method create
has 9 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
int $depositId,
int $withdrawId,
string $status,
Model $fromModel,
Model $toModel,
Method create
has 9 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Wallet $fromWallet,
Wallet $toWallet,
int $discount,
string $fee,
TransactionDtoInterface $withdrawDto,
Method create
has 9 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Wallet $fromWallet,
Wallet $toWallet,
int $discount,
string $fee,
TransactionDtoInterface $withdrawDto,
Method transferExtraLazy
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Wallet $from,
WalletModel $fromWallet,
Wallet $to,
WalletModel $toWallet,
string $status,
Method create
has 7 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Model $payable,
int $walletId,
string $type,
float|int|string $amount,
bool $confirmed,
Method withdraw
has 5 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Wallet $wallet,
float|int|string $amount,
?array $meta,
bool $confirmed = true,
?string $uuid = null
Method makeOne
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Wallet $wallet,
string $type,
float|int|string $amount,
?array $meta,
bool $confirmed = true
Method deposit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Wallet $wallet,
float|int|string $amount,
?array $meta,
bool $confirmed = true,
?string $uuid = null
Method transferLazy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
Confirmed
Wallet $from,
Wallet $to,
string $status,
float|int|string $amount,
ExtraDtoInterface|array|null $meta = null