DerDu/SPHERE-Framework

View on GitHub
Application/Api/Reporting/Individual/ApiIndividual.php

Summary

Maintainability
F
1 mo
Test Coverage

File ApiIndividual.php has 1783 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Api\Reporting\Individual;

use Doctrine\ORM\Query\Expr\Join;
Severity: Major
Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 4 days to fix

    Function buildSearchQuery has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
    Open

        private function buildSearchQuery($ViewType = TblWorkSpace::VIEW_TYPE_ALL, $SqlReturn = false)
        {
            $Binding = Individual::useService()->getBinding();
            $Manager = $Binding->getEntityManager();
            $Builder = $Manager->getQueryBuilder();
    Severity: Minor
    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 days 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 getNavigation has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getNavigation($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
        {
    
            // remove every entry that is already chosen
            $WorkSpaceList = array();
    Severity: Minor
    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 days 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 getNavigation has 234 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getNavigation($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
        {
    
            // remove every entry that is already chosen
            $WorkSpaceList = array();
    Severity: Major
    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 day to fix

      ApiIndividual has 48 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ApiIndividual extends IndividualReceiver implements IApiInterface, IModuleInterface
      {
      
          // Schränkt die Auswahl der Filterung auf "like" und "not like" ein
          private $reducedSelectBoxList = array(
      Severity: Minor
      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 6 hrs to fix

        Method buildSearchQuery has 156 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function buildSearchQuery($ViewType = TblWorkSpace::VIEW_TYPE_ALL, $SqlReturn = false)
            {
                $Binding = Individual::useService()->getBinding();
                $Manager = $Binding->getEntityManager();
                $Builder = $Manager->getQueryBuilder();
        Severity: Major
        Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 6 hrs to fix

          Function getFilter has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getFilter($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
              {
          
                  $tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType);
                  $LayoutColumnAll = array();
          Severity: Minor
          Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 5 hrs 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 getFilter has 130 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getFilter($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
              {
          
                  $tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType);
                  $LayoutColumnAll = array();
          Severity: Major
          Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 5 hrs to fix

            Function getPanelList has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

                private function getPanelList(AbstractView $View, $WorkSpaceList, $ViewType)
                {
                    $PanelString = '';
            
                    $ViewBlockList = array();
            Severity: Minor
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 4 hrs 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 moveFieldRight has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
            Open

                public function moveFieldRight($WorkSpaceId = null, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                {
            
                    $tblWorkSpace = Individual::useService()->getWorkSpaceById($WorkSpaceId);
                    if ($tblWorkSpace) {
            Severity: Minor
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 hrs 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 moveFieldLeft has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
            Open

                public function moveFieldLeft($WorkSpaceId = null, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                {
            
                    $tblWorkSpace = Individual::useService()->getWorkSpaceById($WorkSpaceId);
                    if ($tblWorkSpace) {
            Severity: Minor
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 hrs 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 pipelineNavigation has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function pipelineNavigation($isLoadFilter = true, $ViewType = TblWorkSpace::VIEW_TYPE_ALL, $PresetId = null)
                {
            
                    $Pipeline = new Pipeline();
                    $Emitter = new ServerEmitter(self::receiverNavigation(), self::getEndpoint());
            Severity: Minor
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 hrs 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 createPreset has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                public function createPreset($PresetName, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                {
            
                    $tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType);
                    if ($tblWorkSpaceList && $PresetName) {
            Severity: Minor
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 hrs 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 getBehaviorRadioBox has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getBehaviorRadioBox($RadioBoxName)
                {
            
                    $RadioBoxList = array();
                    foreach($this->reducedSelectBoxList as &$reducedSelectBox){
            Severity: Major
            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 hrs to fix

              Method getModalPreset has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getModalPreset($Info = '', $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                  {
              
                      $tblPresetList = Individual::useService()->getPresetAll();
                      $TableContent = array();
              Severity: Major
              Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 hrs to fix

                Method getModalSavePreset has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getModalSavePreset($Info = '', $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                    {
                
                        $Global = $this->getGlobal();
                        $Post = $Global->POST;
                Severity: Major
                Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 hrs to fix

                  Method setInitialView has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function setInitialView(QueryBuilder $Builder, $ViewType, &$ViewList = array(), &$ParameterList = array())
                      {
                          switch ($ViewType) {
                              case TblWorkSpace::VIEW_TYPE_STUDENT:
                                  $viewGroup = new ViewGroup();
                  Severity: Major
                  Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 hrs to fix

                    Function deletePreset has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function deletePreset($PresetId = null, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                        {
                    
                            $tblPreset = Individual::useService()->getPresetById($PresetId);
                            if ($tblPreset) {
                    Severity: Minor
                    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 2 hrs 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 pipelineDisplayFilter has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static function pipelineDisplayFilter($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                        {
                            $Pipeline = new Pipeline(false);
                            $Emitter = new ServerEmitter(self::receiverFilter(), self::getEndpoint());
                            $Emitter->setGetPayload(array(
                    Severity: Minor
                    Found in Application/Api/Reporting/Individual/ApiIndividual.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

                    Function getDownloadForm has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function getDownloadForm($ViewType = TblWorkSpace::VIEW_TYPE_ALL) {
                            $tblAccount = Account::useService()->getAccountBySession();
                            if(!empty($tblAccount)) {
                                $tblWorkspaceAll = Individual::useService()->getWorkSpaceAllByAccount($tblAccount, $ViewType);
                                if (!empty($tblWorkspaceAll)) {
                    Severity: Minor
                    Found in Application/Api/Reporting/Individual/ApiIndividual.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 getSearchResult has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getSearchResult($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                        {
                    
                    //        return $this->buildSearchQuery($ViewType, true);
                            $Query = $this->buildSearchQuery($ViewType);
                    Severity: Minor
                    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                      Method pipelineAddField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function pipelineAddField($Field, $View, $ViewType)
                          {
                      
                              $Pipeline = new Pipeline();
                              $Emitter = new ServerEmitter(self::receiverService(), self::getEndpoint());
                      Severity: Minor
                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                        Method getPanelList has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function getPanelList(AbstractView $View, $WorkSpaceList, $ViewType)
                            {
                                $PanelString = '';
                        
                                $ViewBlockList = array();
                        Severity: Minor
                        Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                          Method pipelineNavigation has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function pipelineNavigation($isLoadFilter = true, $ViewType = TblWorkSpace::VIEW_TYPE_ALL, $PresetId = null)
                              {
                          
                                  $Pipeline = new Pipeline();
                                  $Emitter = new ServerEmitter(self::receiverNavigation(), self::getEndpoint());
                          Severity: Minor
                          Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                            Method pipelineMoveFilterField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function pipelineMoveFilterField($WorkSpaceId = null, $direction = '', $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                {
                            
                                    $Pipeline = new Pipeline();
                                    if ($direction == 'left') {
                            Severity: Minor
                            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                              Method pipelineDeleteFilterField has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function pipelineDeleteFilterField($WorkSpaceId = null, $ViewType = TblWorkSpace::VIEW_TYPE_STUDENT)
                                  {
                              
                                      $Pipeline = new Pipeline();
                                      $Emitter = new ServerEmitter(self::receiverService(), self::getEndpoint());
                              Severity: Minor
                              Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                                Method buildExcelFile has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function buildExcelFile($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                    {
                                        $Query = $this->buildSearchQuery($ViewType);
                                        $Result = $Query->getResult();
                                
                                
                                Severity: Minor
                                Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

                                  Method pipelineDelete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function pipelineDelete($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                      {
                                  
                                          $Pipeline = new Pipeline();
                                          $Emitter = new ServerEmitter(self::receiverService(), self::getEndpoint());
                                  Severity: Minor
                                  Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

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

                                        private function getDownloadForm($ViewType = TblWorkSpace::VIEW_TYPE_ALL) {
                                            $tblAccount = Account::useService()->getAccountBySession();
                                            if(!empty($tblAccount)) {
                                                $tblWorkspaceAll = Individual::useService()->getWorkSpaceAllByAccount($tblAccount, $ViewType);
                                                if (!empty($tblWorkspaceAll)) {
                                    Severity: Minor
                                    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

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

                                          private function buildExcelFile($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                          {
                                              $Query = $this->buildSearchQuery($ViewType);
                                              $Result = $Query->getResult();
                                      
                                      
                                      Severity: Minor
                                      Found in Application/Api/Reporting/Individual/ApiIndividual.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 createPreset has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function createPreset($PresetName, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                          {
                                      
                                              $tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType);
                                              if ($tblWorkSpaceList && $PresetName) {
                                      Severity: Minor
                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 hr to fix

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

                                            public function getSearchResult($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                            {
                                        
                                        //        return $this->buildSearchQuery($ViewType, true);
                                                $Query = $this->buildSearchQuery($ViewType);
                                        Severity: Minor
                                        Found in Application/Api/Reporting/Individual/ApiIndividual.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 chooseBehaviorMultiExpression has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            private function chooseBehaviorMultiExpression(QueryBuilder &$Builder, $View, $Field, $Value, $Parameter, &$ParameterList, $Behavior)
                                        Severity: Major
                                        Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 50 mins to fix

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

                                              private function chooseBehavior(QueryBuilder &$Builder, $View, $Field, $Value, $Parameter, &$ParameterList, $Behavior)
                                          Severity: Major
                                          Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 50 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                                    if($Behavior == 1){
                                                                                        $OrExp->add( $Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                                                            $Parameter));
                                                                                    } elseif($Behavior == 2) {
                                                                                        $OrExp->add( $Builder->expr()->neq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                            Severity: Major
                                            Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                          if(($YearList = Term::useService()->getYearByNow())){
                                                                              $tblYear = current($YearList);
                                                                              // Speichern im Post
                                                                              $PostArray['TblYear_Year[1]'] = $tblYear->getName();
                                                                          }
                                              Severity: Major
                                              Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 45 mins to fix

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

                                                    private function getRealNameByViewType($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                                    {
                                                        switch($ViewType){
                                                            case TblWorkSpace::VIEW_TYPE_ALL :
                                                                $Name = 'Allgemein';
                                                Severity: Minor
                                                Found in Application/Api/Reporting/Individual/ApiIndividual.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

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                                    if(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
                                                                                        // Add AND Condition to Where (if filter is set)
                                                                                        if($Behavior == 1){
                                                                                            $Builder->andWhere(
                                                                                                $Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                Severity: Major
                                                Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                                          if($Behavior == 1){
                                                                                              $OrExp = $Builder->expr()->orX(
                                                                                                  $Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                                                                      $Parameter));
                                                                                          } elseif($Behavior == 2) {
                                                  Severity: Major
                                                  Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                        if(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
                                                                                            // Add AND Condition to Where (if filter is set)
                                                                                            if($Value === '' && $Behavior == 1){
                                                                                                $Builder->andWhere(
                                                                                                    $Builder->expr()->like($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                    Severity: Major
                                                    Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 45 mins to fix

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

                                                          public function changeFilterCount($WorkSpaceId = null, $direction = '')
                                                          {
                                                              $tblWorkSpace = Individual::useService()->getWorkSpaceById($WorkSpaceId);
                                                              if ($tblWorkSpace) {
                                                                  $FieldCount = $tblWorkSpace->getFieldCount();
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.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

                                                      Function pipelineAddField has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          public static function pipelineAddField($Field, $View, $ViewType)
                                                          {
                                                      
                                                              $Pipeline = new Pipeline();
                                                              $Emitter = new ServerEmitter(self::receiverService(), self::getEndpoint());
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 25 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 addField has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          public function addField($Field, $View, $ViewType)
                                                          {
                                                      
                                                              $Position = 1;
                                                              $tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType);
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 25 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 loadPreset has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          public function loadPreset($PresetId = null, $ViewType = TblWorkSpace::VIEW_TYPE_ALL)
                                                          {
                                                      
                                                              $tblPreset = Individual::useService()->getPresetById($PresetId);
                                                              if ($tblPreset) {
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 25 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 setInitialView has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          private function setInitialView(QueryBuilder $Builder, $ViewType, &$ViewList = array(), &$ParameterList = array())
                                                          {
                                                              switch ($ViewType) {
                                                                  case TblWorkSpace::VIEW_TYPE_STUDENT:
                                                                      $viewGroup = new ViewGroup();
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 25 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

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

                                                                  case TblWorkSpace::VIEW_TYPE_ALL:
                                                                      $Block = $this->getPanelList(new ViewGroup(), $WorkSpaceList, TblWorkSpace::VIEW_TYPE_ALL);
                                                                      if( !empty( $Block ) ) {
                                                                          if( isset($ViewList['ViewGroup']) ) {
                                                                              $AccordionList[] = new Panel( 'Gruppe:', new Scrollable( $Block, 110 ));
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 3 other locations - About 1 day to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1277..1302
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1303..1328
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1329..1354

                                                      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 320.

                                                      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 4 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_CLUB:
                                                                      $Block = $this->getPanelList(new ViewPerson(), $WorkSpaceList, TblWorkSpace::VIEW_TYPE_CLUB);
                                                                      if( !empty( $Block ) ) {
                                                                          if( isset($ViewList['ViewPerson']) ) {
                                                                              $AccordionList[] = new Panel( 'Person:', new Scrollable( $Block, 300 ));
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 3 other locations - About 1 day to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1132..1157
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1277..1302
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1303..1328

                                                      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 320.

                                                      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 4 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_CUSTODY:
                                                                      $Block = $this->getPanelList(new ViewPerson(), $WorkSpaceList, TblWorkSpace::VIEW_TYPE_CUSTODY);
                                                                      if( !empty( $Block ) ) {
                                                                          if( isset($ViewList['ViewPerson']) ) {
                                                                              $AccordionList[] = new Panel( 'Person:', new Scrollable( $Block, 300 ));
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 3 other locations - About 1 day to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1132..1157
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1303..1328
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1329..1354

                                                      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 320.

                                                      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 4 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_TEACHER:
                                                                      $Block = $this->getPanelList(new ViewPerson(), $WorkSpaceList, TblWorkSpace::VIEW_TYPE_TEACHER);
                                                                      if( !empty( $Block ) ) {
                                                                          if( isset($ViewList['ViewPerson']) ) {
                                                                              $AccordionList[] = new Panel( 'Person:', new Scrollable( $Block, 300 ));
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 3 other locations - About 1 day to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1132..1157
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1277..1302
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1329..1354

                                                      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 320.

                                                      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

                                                      Identical blocks of code found in 4 locations. Consider refactoring.
                                                      Open

                                                              foreach ((array)$Exception->getTrace() as $Trace) {
                                                                  $TraceList .= nl2br('<samp class="text-info small">'
                                                                      .( isset( $Trace['type'] ) && isset( $Trace['function'] ) ? 'Method: '.$Trace['type'].$Trace['function'] : 'Method: ' )
                                                                      .( isset( $Trace['class'] ) ? '<br/>Class: '.$Trace['class'] : '<br/>Class: ' )
                                                                      .( isset( $Trace['file'] ) ? '<br/>File: '.$Trace['file'] : '<br/>File: ' )
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 3 other locations - About 3 hrs to fix
                                                      Application/Api/Dispatcher.php on lines 95..105
                                                      Application/Platform/System/Database/ReportingUpgrade.php on lines 201..208
                                                      Common/Window/Display.php on lines 238..245

                                                      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 143.

                                                      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 5 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_PROSPECT:
                                                                      $viewGroup = new ViewGroup();
                                                                      $Parameter = ':Filter'.'Initial'.'Value'.'MetaTable';
                                                                      $Builder->from($viewGroup->getEntityFullName(),
                                                                          $viewGroup->getViewObjectName());
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 4 other locations - About 1 hr to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2038..2049
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2062..2073
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2074..2085
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2086..2097

                                                      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 100.

                                                      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 5 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_STUDENT:
                                                                      $viewGroup = new ViewGroup();
                                                                      $Parameter = ':Filter'.'Initial'.'Value'.'MetaTable';
                                                                      $Builder->from($viewGroup->getEntityFullName(),
                                                                          $viewGroup->getViewObjectName());
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 4 other locations - About 1 hr to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2050..2061
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2062..2073
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2074..2085
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2086..2097

                                                      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 100.

                                                      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 5 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_TEACHER:
                                                                      $viewGroup = new ViewGroup();
                                                                      $Parameter = ':Filter'.'Initial'.'Value'.'MetaTable';
                                                                      $Builder->from($viewGroup->getEntityFullName(),
                                                                          $viewGroup->getViewObjectName());
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 4 other locations - About 1 hr to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2038..2049
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2050..2061
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2062..2073
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2086..2097

                                                      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 100.

                                                      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 5 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_CUSTODY:
                                                                      $viewGroup = new ViewGroup();
                                                                      $Parameter = ':Filter'.'Initial'.'Value'.'MetaTable';
                                                                      $Builder->from($viewGroup->getEntityFullName(),
                                                                          $viewGroup->getViewObjectName() );
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 4 other locations - About 1 hr to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2038..2049
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2050..2061
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2074..2085
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2086..2097

                                                      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 100.

                                                      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 5 locations. Consider refactoring.
                                                      Open

                                                                  case TblWorkSpace::VIEW_TYPE_CLUB:
                                                                      $viewGroup = new ViewGroup();
                                                                      $Parameter = ':Filter'.'Initial'.'Value'.'MetaTable';
                                                                      $Builder->from($viewGroup->getEntityFullName(),
                                                                          $viewGroup->getViewObjectName());
                                                      Severity: Major
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 4 other locations - About 1 hr to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2038..2049
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2050..2061
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2062..2073
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 2074..2085

                                                      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 100.

                                                      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

                                                                                          if(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
                                                                                              // Add AND Condition to Where (if filter is set)
                                                                                              if($Behavior == 1){
                                                                                                  $Builder->andWhere(
                                                                                                      $Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 55 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1907..1923

                                                      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 99.

                                                      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

                                                                                          if(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
                                                                                              // Add AND Condition to Where (if filter is set)
                                                                                              if($Behavior == 1){
                                                                                                  $OrExp->add( $Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
                                                                                                      $Parameter));
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 55 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1949..1967

                                                      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 99.

                                                      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

                                                          private function decodeField($Name) {
                                                              $DecoderPattern = array(
                                                                  '!_aE_!s' => 'ä',
                                                                  '!_oE_!s' => 'ö',
                                                                  '!_uE_!s' => 'ü',
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 45 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1770..1785

                                                      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 96.

                                                      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

                                                          private function encodeField($Name) {
                                                              $EncoderPattern = array(
                                                                  '!ä!s' => '_aE_',
                                                                  '!ö!s' => '_oE_',
                                                                  '!ü!s' => '_uE_',
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 45 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 1791..1805

                                                      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 96.

                                                      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

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

                                                                  if($ViewType === TblWorkSpace::VIEW_TYPE_STUDENT){
                                                                      if(($tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType))){
                                                                          foreach($tblWorkSpaceList as $tblWorkSpace){
                                                                              // aktuelles Schuljahr finden
                                                                              if($tblWorkSpace->getField() === 'TblYear_Year'){
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 40 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 678..692

                                                      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

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

                                                              if($ViewType === TblWorkSpace::VIEW_TYPE_STUDENT){
                                                                  if(($tblWorkSpaceList = Individual::useService()->getWorkSpaceAll($ViewType))){
                                                                      foreach($tblWorkSpaceList as $tblWorkSpace){
                                                                          // aktuelles Schuljahr finden
                                                                          if($tblWorkSpace->getField() === 'TblYear_Year'){
                                                      Severity: Minor
                                                      Found in Application/Api/Reporting/Individual/ApiIndividual.php and 1 other location - About 40 mins to fix
                                                      Application/Api/Reporting/Individual/ApiIndividual.php on lines 578..592

                                                      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

                                                      There are no issues that match your filters.

                                                      Category
                                                      Status