PHPixie/Database

View on GitHub

Showing 66 of 66 total issues

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

    public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Severity: Minor
Found in src/PHPixie/Database/Conditions/Builder/Container.php - About 35 mins to fix

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

        public function addOperatorCondition($logic, $negate, $field, $operator, $values)
    Severity: Minor
    Found in src/PHPixie/Database/Driver/Mongo/Query/Item.php - About 35 mins to fix

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

          public function addOperatorCondition($logic, $negate, $field, $operator, $values)
      Severity: Minor
      Found in src/PHPixie/Database/Driver/PDO/Query/Items.php - About 35 mins to fix

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

            public function addHavingOperatorCondition($logic, $negate, $field, $operator, $values);
        Severity: Minor
        Found in src/PHPixie/Database/Type/SQL/Query/Type/Select.php - About 35 mins to fix

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

              public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
          Severity: Minor
          Found in src/PHPixie/Database/Driver/PDO/Query/Items.php - About 35 mins to fix

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

                public function addOnOperatorCondition($logic, $negate, $field, $operator, $values)
            Severity: Minor
            Found in src/PHPixie/Database/Type/SQL/Query/Implementation/Builder.php - About 35 mins to fix

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

                  public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
              Severity: Minor
              Found in src/PHPixie/Database/Driver/Mongo/Query/Item.php - About 35 mins to fix

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

                    public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values);
                Severity: Minor
                Found in src/PHPixie/Database/Query/Items.php - About 35 mins to fix

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

                      public function addInOperatorCondition($field, $values, $logic, $negate, $containerName)
                  Severity: Minor
                  Found in src/PHPixie/Database/Driver/Mongo/Query/Builder.php - About 35 mins to fix

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

                        protected function parseIn($field, $operator, $value, $negated, $convertMongoId = false)
                    Severity: Minor
                    Found in src/PHPixie/Database/Driver/Mongo/Parser/Operator.php - About 35 mins to fix

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

                          public function addHavingOperatorCondition($logic, $negate, $field, $operator, $values)
                      Severity: Minor
                      Found in src/PHPixie/Database/Driver/PDO/Query/Type/Select.php - About 35 mins to fix

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

                            protected function addContainerInOperatorCondition($field, $values, $logic, $negate, $containerName = null)
                        Severity: Minor
                        Found in src/PHPixie/Database/Driver/PDO/Query/Items.php - About 35 mins to fix

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

                              public function addOnOperatorCondition($logic, $negate, $field, $operator, $values);
                          Severity: Minor
                          Found in src/PHPixie/Database/Type/SQL/Query/Items.php - About 35 mins to fix

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

                                public function addOperatorCondition($logic, $negate, $field, $operator, $values);
                            Severity: Minor
                            Found in src/PHPixie/Database/Conditions/Builder.php - About 35 mins to fix

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

                                  public function __construct($database, $driver, $config, $fragmentParser, $conditionsParser)
                              Severity: Minor
                              Found in src/PHPixie/Database/Type/SQL/Parser.php - About 35 mins to fix

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

                                    protected function addKeyValuesToArray($name, $args, $requireKeys = false, $firstParameterIsKey = true, $assertIsNumeric = false)
                                Severity: Minor
                                Found in src/PHPixie/Database/Query/Implementation/Builder.php - About 35 mins to fix

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

                                      protected function addContainerSubarrayItemPlaceholder($field, $logic = 'and', $negate = false, $allowEmpty = true, $containerName = null)
                                  Severity: Minor
                                  Found in src/PHPixie/Database/Driver/Mongo/Query/Item.php - About 35 mins to fix

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

                                        public function addInOperatorCondition($field, $values, $logic, $negate, $containerName)
                                    Severity: Minor
                                    Found in src/PHPixie/Database/Type/SQL/Query/Implementation/Builder.php - About 35 mins to fix

                                      Function normalize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          protected function normalize($condition, $prefix = null)
                                          {
                                              if($condition instanceof \PHPixie\Database\Type\Document\Conditions\Condition\Collection\Embedded\SubarrayItem) {
                                                  $conditions = $condition->conditions();
                                                  $parsed = $this->parse($conditions, false);
                                      Severity: Minor
                                      Found in src/PHPixie/Database/Driver/Mongo/Parser/Conditions.php - About 35 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Avoid too many return statements within this method.
                                      Open

                                                      return $this->countQuery($query, $runner);
                                      Severity: Major
                                      Found in src/PHPixie/Database/Driver/Mongo/Parser.php - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language