Showing 5 of 9 total issues
File LndService.php
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
Method send
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(LightningPayment $payment): LightningPayment
{
Assertion::true($this->canSend($payment->getAmount()), 'Lnd service cannot send given amount.');
/** @var LndGrpcClient $client */
Method createInvoiceMessage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createInvoiceMessage(AMQPMessage $amqpMessage): LightningInvoiceMessageInterface
{
$invoice = json_decode($amqpMessage->body, true);
switch ($invoice['state']) {
Method getPayment
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPayment(Hash $preimageHash): ?LightningPayment
{
/** @var LndGrpcClient $client */
$client = $this->connector->getConnection();
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Text $incomingChannelId,
Text $outgoingChannelId,
Text $incomingHtlcId,
Text $outgoingHtlcId,
Timestamp $timestamp,