Showing 108 of 120 total issues

Method mapCommon has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function mapCommon($query, $databaseQuery, $queryPlan)
    {
        $modelName           = $query->modelName();
        $conditions          = $query->getConditions();
        $requiredPlan        = $queryPlan->requiredPlan();
Severity: Minor
Found in src/PHPixie/ORM/Mappers/Query.php - About 1 hr to fix

    Method linkPlan has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function linkPlan($config, $owner, $items)
        {
            $ownerRepository = $this->getRepository($config->ownerModel);
            $ownerQuery = $ownerRepository->databaseSelectQuery();
            
    Severity: Minor
    Found in src/PHPixie/ORM/Relationships/Type/OneTo/Handler.php - About 1 hr to fix

      Method processProperties has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function processProperties($action, $owners, $ownerProperty, $items)
          {
              if (!is_array($owners))
                  $owners = array($owners);
      
      Severity: Minor
      Found in src/PHPixie/ORM/Relationships/Type/ManyToMany/Handler.php - About 1 hr to fix

        Function processOwner has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function processOwner($action, $config, $owner, $items = array())
            {
                if(!is_array($items))
                    $items = array($items);
                
        Severity: Minor
        Found in src/PHPixie/ORM/Relationships/Type/OneTo/Type/Many/Handler.php - About 1 hr 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 loadProperty has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function loadProperty($property)
            {
                $this->ensureMapped();
                $entity = $property->entity();
                $type = $property->side()->type();
        Severity: Minor
        Found in src/PHPixie/ORM/Relationships/Type/NestedSet/Preloader.php - About 1 hr to fix

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

              public function __construct($configs, $conditions, $data, $database, $models, $maps, $mappers, $values)
          Severity: Major
          Found in src/PHPixie/ORM/Drivers/Driver.php - About 1 hr to fix

            Function getDocumentByExplodedPath has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function getDocumentByExplodedPath($document, $explodedPath, $createMissing)
                {
                    $last = count($explodedPath) - 1;
                    foreach($explodedPath as $i => $key) {
                        $property = $document->get($key);
            Severity: Minor
            Found in src/PHPixie/ORM/Planners/Planner/Document.php - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
            Open

                public function execute()
                {
                    $fields = $this->fields();
                    $data = $this->dataStep->data();
                    $this->selectQuery->fields($fields);
            Severity: Minor
            Found in src/PHPixie/ORM/Steps/Step/Query/Insert/Batch/Data/Unique.php - About 55 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 in has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function in($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false)
            Severity: Major
            Found in src/PHPixie/ORM/Planners/Planner/In/Strategy/Subquery.php - About 50 mins to fix

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

                  public function subquery($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false)
              Severity: Major
              Found in src/PHPixie/ORM/Planners/Planner/In.php - About 50 mins to fix

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

                    public function __construct($loaders, $side, $modelConfig, $result, $loader, $parentResult, $relatedLoader)
                Severity: Major
                Found in src/PHPixie/ORM/Relationships/Type/NestedSet/Preloader.php - About 50 mins to fix

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

                      public function result($query, $queryField, $reusableResult, $resultField, $plan, $logic = 'and', $negate = false)
                  Severity: Major
                  Found in src/PHPixie/ORM/Planners/Planner/In.php - About 50 mins to fix

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

                        public function in($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false)
                    Severity: Major
                    Found in src/PHPixie/ORM/Planners/Planner/In/Strategy/Multiquery.php - About 50 mins to fix

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

                          abstract public function in($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false);
                      Severity: Major
                      Found in src/PHPixie/ORM/Planners/Planner/In/Strategy.php - About 50 mins to fix

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

                            public function databaseModelQuery($query, $queryField, $modelQuery, $modelQueryField, $plan, $logic = 'and', $negate = false)
                        Severity: Major
                        Found in src/PHPixie/ORM/Planners/Planner/In.php - About 50 mins to fix

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

                              public function __construct($configs, $models, $planners, $plans, $steps, $loaders, $mappers)
                          Severity: Major
                          Found in src/PHPixie/ORM/Relationships/Relationship/Implementation.php - About 50 mins to fix

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

                                public function __construct($models, $planners, $plans, $steps, $loaders, $mappers, $relationship)
                            Severity: Major
                            Found in src/PHPixie/ORM/Relationships/Relationship/Implementation/Handler.php - About 50 mins to fix

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

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

                                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 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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language