SergioMadness/payment-laravel

View on GitHub

Showing 94 of 94 total issues

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

                                   string $description = '',
Severity: Minor
Found in src/contracts/PayService.php by phpcodesniffer

The closing parenthesis of a multi-line function declaration must be on a new line
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

                                   string $currency = self::CURRENCY_RUR,
Severity: Minor
Found in src/contracts/PayService.php by phpcodesniffer

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

                                   Receipt $receipt = null): string;
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 $failReturnUrl = '',
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/contracts/PayService.php by phpcodesniffer

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

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

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

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

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/Payment.php by phpcodesniffer

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

                                   float $amount,
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 $failReturnUrl = '',
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 getPaymentLink($orderId,
Severity: Minor
Found in src/Payment.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/Payment.php by phpcodesniffer

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

                                   string $currency = self::CURRENCY_RUR,
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/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/Payment.php by phpcodesniffer

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

                                   $paymentId,
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): Form
Severity: Minor
Found in src/Payment.php by phpcodesniffer

The method needConfirmation has a boolean flag argument $flag, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function needConfirmation(bool $flag = true): self;

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getPaymentForm has 10 parameters. Consider reducing the number of parameters to less than 10.
Open

    public function getPaymentForm($orderId,
                                   $paymentId,
                                   float $amount,
                                   string $currency = self::CURRENCY_RUR,
                                   string $paymentType = self::PAYMENT_TYPE_CARD,
Severity: Minor
Found in src/Payment.php by phpmd
Severity
Category
Status
Source
Language