iranianpep/code-jetter

View on GitHub
core/ICrud.php

Summary

Maintainability
A
1 hr
Test Coverage

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

        array $criteria,
        array $inputs,
        array $fieldsValues,
        $limit = 0,
        $extraDefinedInputs = [],
Severity: Major
Found in core/ICrud.php - About 50 mins to fix

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

        public function getAll(array $criteria = [], array $fromColumns = [], $order = null, $start = 0, $limit = 0);
    Severity: Minor
    Found in core/ICrud.php - About 35 mins to fix

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

              $batchAction = false
      Severity: Minor
      Found in core/ICrud.php by phpmd

      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 update has a boolean flag argument $excludeArchived, which is a certain sign of a Single Responsibility Principle violation.
      Open

              $excludeArchived = true,
      Severity: Minor
      Found in core/ICrud.php by phpmd

      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

      There are no issues that match your filters.

      Category
      Status