Showing 108 of 120 total issues

Method items has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function items($query, $modelName, $items, $plan, $logic = 'and', $negate = false)
Severity: Minor
Found in src/PHPixie/ORM/Planners/Planner/In.php - About 45 mins to fix

    Method processProperty has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected function processProperty($type, $config, $entity, $action, $value = null, $unsetRelated = true)
    Severity: Minor
    Found in src/PHPixie/ORM/Relationships/Type/OneTo/Type/One/Handler.php - About 45 mins to fix

      Function offsetExists has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function offsetExists($offset)
          {
              if($this->currentOffset === $offset)
                  return true;
              
      Severity: Minor
      Found in src/PHPixie/ORM/Loaders/Loader/Repository/DataIterator.php - About 45 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

      Function processConfig has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function processConfig($configSlice, $inflector)
          {
              $sides = array('left' => 'right', 'right' => 'left');
      
              foreach ($sides as $side) {
      Severity: Minor
      Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Side/Config.php - About 45 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

      Function execute has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function execute()
          {
              $fields = array(
                  $rootIdKey = $this->config->rootIdKey,
                  $leftKey = $this->config->leftKey,
      Severity: Minor
      Found in src/PHPixie/ORM/Relationships/Type/NestedSet/Steps/MapQuery.php - About 45 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

      Method preloader has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function preloader($side, $modelConfig, $result, $loader, $parentResult, $relatedLoader)
      Severity: Minor
      Found in src/PHPixie/ORM/Relationships/Type/NestedSet.php - About 45 mins to fix

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

            public function __construct($loaders, $side, $modelConfig, $result, $loader, $pivotResult)
        Severity: Minor
        Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Preloader.php - About 45 mins to fix

          Method map has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function map($preloadable, $modelName, $preload, $result, $plan, $loader)
          Severity: Minor
          Found in src/PHPixie/ORM/Mappers/Preload.php - About 45 mins to fix

            Function updateSkippedOffsets has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function updateSkippedOffsets()
                {
                    $skippedOffsets = array();
                    foreach($this->skippedIds as $skippedOffset)
                        if($skippedOffset!==null)
            Severity: Minor
            Found in src/PHPixie/ORM/Loaders/Loader/Proxy/Editable.php - About 45 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

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

                public function __construct($mappers, $relationships, $models, $planners, $steps, $cascadeDeletMap)
            Severity: Minor
            Found in src/PHPixie/ORM/Mappers/Cascade/Mapper/Delete.php - About 45 mins to fix

              Method getUnlinkPlan has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  protected function getUnlinkPlan($config, $constrainOwners, $owners, $constrainItems, $items, $logic = 'and')
              Severity: Minor
              Found in src/PHPixie/ORM/Relationships/Type/OneTo/Handler.php - About 45 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/ORM/Conditions/Builder/Container.php - About 35 mins to fix

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

                      public function mapPreload($side, $preloadProperty, $result, $plan, $relatedLoader)
                  Severity: Minor
                  Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php - About 35 mins to fix

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

                        protected function mapDeleteQuery($deleteQuery, $selectQuery, $modelName, $plan, $path)
                    Severity: Minor
                    Found in src/PHPixie/ORM/Mappers/Cascade/Mapper/Delete.php - About 35 mins to fix

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

                          public function mapPreload($side, $property, $result, $plan, $loader);
                      Severity: Minor
                      Found in src/PHPixie/ORM/Relationships/Relationship/Handler/Preloading.php - About 35 mins to fix

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

                            public function mapPreload($side, $preloadProperty, $reusableResult, $plan, $relatedLoader)
                        Severity: Minor
                        Found in src/PHPixie/ORM/Relationships/Type/OneTo/Handler.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/ORM/Conditions/Builder/Proxy.php - About 35 mins to fix

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

                                public function __construct($values, $queryMapper, $queryPropertyMap, $container, $config)
                            Severity: Minor
                            Found in src/PHPixie/ORM/Models/Type/Database/Implementation/Query.php - About 35 mins to fix

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

                                  public function __construct($mappers, $loaders, $models, $plans, $steps)
                              Severity: Minor
                              Found in src/PHPixie/ORM/Mappers/Query.php - About 35 mins to fix

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

                                    public function __construct($loaders, $side, $modelConfig, $result, $loader)
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language