Cloudstek/mollie-php-api

View on GitHub
src/Resource/Customer/PaymentResource.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    public function create($amount, $description, $redirectUrl, $metadata = null, array $opts = array())
Severity: Minor
Found in src/Resource/Customer/PaymentResource.php - About 35 mins to fix

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

        public function createFirstRecurring($amount, $description, $redirectUrl, $metadata = nul, array $opts = array())
    Severity: Minor
    Found in src/Resource/Customer/PaymentResource.php - About 35 mins to fix

      Missing class import via use statement (line '55', column '23').
      Open

                  throw new \InvalidArgumentException('Metadata argument must be of type array or object.');

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      Missing class import via use statement (line '50', column '23').
      Open

                  throw new \InvalidArgumentException(sprintf("Invalid recurring type '%s'. Recurring type must be 'first' or 'recurring'.", $opts['recurringType']));

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

      Source http://phpmd.org/rules/cleancode.html#MissingImport

      There are no issues that match your filters.

      Category
      Status