Showing 120 of 120 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function __construct($configs, $models, $planners, $plans, $steps, $loaders, $mappers)
    {
        $this->configs  = $configs;
        $this->models   = $models;
        $this->planners = $planners;
Severity: Minor
Found in src/PHPixie/ORM/Relationships/Relationship/Implementation.php and 1 other location - About 45 mins to fix
src/PHPixie/ORM/Relationships/Relationship/Implementation/Handler.php on lines 15..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 95.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function unlinkPlan($config, $leftItems, $rightItems)
    {
        $plan = $this->plans->steps();
        list($leftSide, $rightSide) = $this->plannerSides($config, $leftItems, $rightItems);
        $pivot = $this->plannerPivot($config);
Severity: Minor
Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php and 1 other location - About 40 mins to fix
src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php on lines 31..39

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 93.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function linkPlan($config, $leftItems, $rightItems)
    {
        $plan = $this->plans->steps();
        list($leftSide, $rightSide) = $this->plannerSides($config, $leftItems, $rightItems);
        $pivot = $this->plannerPivot($config);
Severity: Minor
Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php and 1 other location - About 40 mins to fix
src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php on lines 41..49

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 93.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

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

        public function __construct($config, $type, $builder, $result, $immediateOnly = false)
    Severity: Minor
    Found in src/PHPixie/ORM/Relationships/Type/NestedSet/Steps/MapQuery.php - About 35 mins to fix

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

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

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

              public function mapQuery($config, $type, $builder, $result, $immediateOnly = false)
          Severity: Minor
          Found in src/PHPixie/ORM/Relationships/Type/NestedSet/Steps.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.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/Type/Many/Handler.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/Type/Embeds/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/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 processItems has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          protected function processItems($action, $config, $items, $owner = null, $processOldOwner = true)
                      Severity: Minor
                      Found in src/PHPixie/ORM/Relationships/Type/OneTo/Type/Many/Handler.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 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/Proxy.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 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 __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

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