SergioMadness/payment-laravel

View on GitHub

Showing 94 of 94 total issues

Payment has 43 functions (exceeds 20 allowed). Consider refactoring.
Open

class Payment implements PaymentFacade
{
    /**
     * Available drivers
     *
Severity: Minor
Found in src/Payment.php - About 5 hrs to fix

    Method getPaymentLink has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function getPaymentLink($orderId,
                                       $paymentId,
                                       float $amount,
                                       string $currency = self::CURRENCY_RUR,
                                       string $paymentType = self::PAYMENT_TYPE_CARD,
    Severity: Major
    Found in src/Payment.php - About 1 hr to fix

      Method getPaymentLink has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function getPaymentLink($orderId,
                                         $paymentId,
                                         float $amount,
                                         string $currency = self::CURRENCY_RUR,
                                         string $paymentType = self::PAYMENT_TYPE_CARD,
      Severity: Major
      Found in src/contracts/PayService.php - About 1 hr to fix

        Method getPaymentForm has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function getPaymentForm($orderId,
                                           $paymentId,
                                           float $amount,
                                           string $currency = self::CURRENCY_RUR,
                                           string $paymentType = self::PAYMENT_TYPE_CARD,
        Severity: Major
        Found in src/contracts/PayService.php - About 1 hr to fix

          Method getPaymentForm has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function getPaymentForm($orderId,
                                             $paymentId,
                                             float $amount,
                                             string $currency = self::CURRENCY_RUR,
                                             string $paymentType = self::PAYMENT_TYPE_CARD,
          Severity: Major
          Found in src/Payment.php - About 1 hr to fix

            Method initPayment has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function initPayment(string $token, string $orderId, string $paymentId, float $amount, string $description, string $currency = PayService::CURRENCY_RUR_ISO, array $extraParams = []): bool;
            Severity: Major
            Found in src/contracts/recurring/RecurringPayment.php - About 50 mins to fix

              Avoid variables with short names like $id. Configured minimum length is 3.
              Open

                  public function getSchedule(string $id): RecurringSchedule;

              ShortVariable

              Since: 0.2

              Detects when a field, local, or parameter has a very short name.

              Example

              class Something {
                  private $q = 15; // VIOLATION - Field
                  public static function main( array $as ) { // VIOLATION - Formal
                      $r = 20 + $this->q; // VIOLATION - Local
                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                          $r += $this->q;
                      }
                  }
              }

              Source https://phpmd.org/rules/naming.html#shortvariable

              Avoid variables with short names like $id. Configured minimum length is 3.
              Open

                  public function getTransactionStatus($id): string;
              Severity: Minor
              Found in src/contracts/PaymentApprove.php by phpmd

              ShortVariable

              Since: 0.2

              Detects when a field, local, or parameter has a very short name.

              Example

              class Something {
                  private $q = 15; // VIOLATION - Field
                  public static function main( array $as ) { // VIOLATION - Formal
                      $r = 20 + $this->q; // VIOLATION - Local
                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                          $r += $this->q;
                      }
                  }
              }

              Source https://phpmd.org/rules/naming.html#shortvariable

              Avoid variables with short names like $id. Configured minimum length is 3.
              Open

                  public function setAccountId(string $id): self;

              ShortVariable

              Since: 0.2

              Detects when a field, local, or parameter has a very short name.

              Example

              class Something {
                  private $q = 15; // VIOLATION - Field
                  public static function main( array $as ) { // VIOLATION - Formal
                      $r = 20 + $this->q; // VIOLATION - Local
                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                          $r += $this->q;
                      }
                  }
              }

              Source https://phpmd.org/rules/naming.html#shortvariable

              Avoid variables with short names like $id. Configured minimum length is 3.
              Open

                  public function setUserId(string $id): self;

              ShortVariable

              Since: 0.2

              Detects when a field, local, or parameter has a very short name.

              Example

              class Something {
                  private $q = 15; // VIOLATION - Field
                  public static function main( array $as ) { // VIOLATION - Formal
                      $r = 20 + $this->q; // VIOLATION - Local
                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                          $r += $this->q;
                      }
                  }
              }

              Source https://phpmd.org/rules/naming.html#shortvariable

              Avoid variables with short names like $id. Configured minimum length is 3.
              Open

                  public function approveTransaction($id): bool;
              Severity: Minor
              Found in src/contracts/PaymentApprove.php by phpmd

              ShortVariable

              Since: 0.2

              Detects when a field, local, or parameter has a very short name.

              Example

              class Something {
                  private $q = 15; // VIOLATION - Field
                  public static function main( array $as ) { // VIOLATION - Formal
                      $r = 20 + $this->q; // VIOLATION - Local
                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                          $r += $this->q;
                      }
                  }
              }

              Source https://phpmd.org/rules/naming.html#shortvariable

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

                  public function __construct(string $name = null, int $qty = null, float $price = null, int $tax = null, string $currency = 'RUR')
              Severity: Minor
              Found in src/drivers/receipt/ReceiptItem.php - About 35 mins to fix

                The closing parenthesis of a multi-line function declaration must be on a new line
                Open

                                                   Receipt $receipt = null): Form;
                Severity: Minor
                Found in src/contracts/PayService.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   string $paymentType = self::PAYMENT_TYPE_CARD,
                Severity: Minor
                Found in src/Payment.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   string $successReturnUrl = '',
                Severity: Minor
                Found in src/Payment.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   Receipt $receipt = null): string
                Severity: Minor
                Found in src/Payment.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   array $extraParams = [],
                Severity: Minor
                Found in src/Payment.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   $paymentId,
                Severity: Minor
                Found in src/contracts/PayService.php by phpcodesniffer

                The first parameter of a multi-line function declaration must be on the line after the opening bracket
                Open

                    public function getPaymentForm($orderId,
                Severity: Minor
                Found in src/contracts/PayService.php by phpcodesniffer

                Multi-line function declaration not indented correctly; expected 8 spaces but found 35
                Open

                                                   $paymentId,
                Severity: Minor
                Found in src/contracts/PayService.php by phpcodesniffer
                Severity
                Category
                Status
                Source
                Language