chartmogul/chartmogul-php

View on GitHub

Showing 5 of 13 total issues

Customer has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class Customer extends AbstractResource
{
use CreateTrait;
use AllTrait;
use GetTrait;
Severity: Minor
Found in src/Customer.php - About 2 hrs to fix

    File Customer.php has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
     
    namespace ChartMogul;
     
    use ChartMogul\Resource\AbstractResource;
    Severity: Minor
    Found in src/Customer.php - About 2 hrs to fix

      Method handleResponse has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      public function handleResponse(ResponseInterface $response)
      {
      $response->getBody()->rewind();
      $data = json_decode($response->getBody()->getContents(), true);
      switch ($response->getStatusCode()) {
      Severity: Minor
      Found in src/Http/Client.php - About 1 hr to fix

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

        public static function unmerge($customer_uuid, $external_id, $data_source_uuid, array $move_to_new_customer = [], ?ClientInterface $client = null)
        Severity: Minor
        Found in src/Customer.php - About 35 mins to fix

          Function allData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          public static function allData(array $data, Collection $array)
          {
          if (isset($data["current_page"])) {
          $array->current_page = $data["current_page"];
          }
          Severity: Minor
          Found in src/Resource/AbstractResource.php - About 25 mins to fix
          Severity
          Category
          Status
          Source
          Language