hnhdigital-os/laravel-model-filter

View on GitHub

Showing 194 of 194 total issues

Avoid too many return statements within this method.
Open

                        return true;
Severity: Major
Found in src/Traits/ModelTrait.php - About 30 mins to fix

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

        protected static function returnSearchResult($controller_name, $distinct_session, $search_request, $response, $extra_response = false)
    Severity: Minor
    Found in src/Traits/ControllerTrait.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 getSearchAppliedFilters has a boolean flag argument $use_session, which is a certain sign of a Single Responsibility Principle violation.
    Open

        protected static function getSearchAppliedFilters($controller_name, $distinct_session = '', $use_session = false)
    Severity: Minor
    Found in src/Traits/ControllerTrait.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 getFilterAttributes has a boolean flag argument $first_call, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public static function getFilterAttributes($first_call = true)
    Severity: Minor
    Found in src/Traits/ModelTrait.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 getFilterOperators has a boolean flag argument $operator, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getFilterOperators($type, $operator = false)
    Severity: Minor
    Found in src/Traits/ModelTrait.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

    Avoid too many return statements within this method.
    Open

                            return true;
    Severity: Major
    Found in src/Traits/ModelTrait.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                              return true;
      Severity: Major
      Found in src/Traits/ModelTrait.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                                return true;
        Severity: Major
        Found in src/Traits/ModelTrait.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return true;
          Severity: Major
          Found in src/Traits/ModelTrait.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                    return true;
            Severity: Major
            Found in src/Traits/ModelTrait.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                      return true;
              Severity: Major
              Found in src/Traits/ModelTrait.php - About 30 mins to fix

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

                    public function getCurrentSearchQuery($options, $class_name, $model_filter = false)
                Severity: Minor
                Found in src/Traits/ControllerTrait.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

                Avoid too many return statements within this method.
                Open

                                        return true;
                Severity: Major
                Found in src/Traits/ModelTrait.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                          return true;
                  Severity: Major
                  Found in src/Traits/ModelTrait.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                            return true;
                    Severity: Major
                    Found in src/Traits/ModelTrait.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                              return true;
                      Severity: Major
                      Found in src/Traits/ModelTrait.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                                return true;
                        Severity: Major
                        Found in src/Traits/ModelTrait.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return false;
                          Severity: Major
                          Found in src/Traits/ModelTrait.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return true;
                            Severity: Major
                            Found in src/Traits/ModelTrait.php - About 30 mins to fix

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

                                  private static function applyFilterAttributeArray($query, $attribute_list, $method, $arguments, $positive = true)
                              Severity: Minor
                              Found in src/Traits/ModelTrait.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

                              Severity
                              Category
                              Status
                              Source
                              Language