NGUtech/lnd-adapter

View on GitHub

Showing 5 of 9 total issues

File LndService.php has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);
/**
 * This file is part of the ngutech/lnd-adapter project.
 *
 * For the full copyright and license information, please view the LICENSE
Severity: Minor
Found in src/Service/LndService.php - About 2 hrs to fix

    Method send has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function send(LightningPayment $payment): LightningPayment
        {
            Assertion::true($this->canSend($payment->getAmount()), 'Lnd service cannot send given amount.');
    
            /** @var LndGrpcClient $client */
    Severity: Minor
    Found in src/Service/LndService.php - About 1 hr to fix

      Method createInvoiceMessage has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function createInvoiceMessage(AMQPMessage $amqpMessage): LightningInvoiceMessageInterface
          {
              $invoice = json_decode($amqpMessage->body, true);
      
              switch ($invoice['state']) {
      Severity: Minor
      Found in src/Message/LndMessageWorker.php - About 1 hr to fix

        Method getPayment has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getPayment(Hash $preimageHash): ?LightningPayment
            {
                /** @var LndGrpcClient $client */
                $client = $this->connector->getConnection();
        
        
        Severity: Minor
        Found in src/Service/LndService.php - About 1 hr to fix

          Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  Text $incomingChannelId,
                  Text $outgoingChannelId,
                  Text $incomingHtlcId,
                  Text $outgoingHtlcId,
                  Timestamp $timestamp,
          Severity: Minor
          Found in src/Message/LndHtlcMessageTrait.php - About 45 mins to fix
            Severity
            Category
            Status
            Source
            Language