DerDu/SPHERE-Framework

View on GitHub
Application/Reporting/CheckList/Frontend.php

Summary

Maintainability
F
1 mo
Test Coverage

Function frontendListObjectElementShow has a Cognitive Complexity of 421 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendListObjectElementShow
    (
        $Id = null,
        $Filter = null,
//        $Data = null,
Severity: Minor
Found in Application/Reporting/CheckList/Frontend.php - About 1 wk 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 frontendListObjectSelect has a Cognitive Complexity of 313 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendListObjectSelect(
        $ListId = null,
        $ObjectTypeId = null,
        $ObjectTypeSelect = null
    ) {
Severity: Minor
Found in Application/Reporting/CheckList/Frontend.php - About 6 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

File Frontend.php has 1623 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Reporting\CheckList;

use SPHERE\Application\Contact\Address\Address;
Severity: Major
Found in Application/Reporting/CheckList/Frontend.php - About 4 days to fix

    Function frontendListObjectAdd has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendListObjectAdd($ListId = null, $ObjectId = null, $ObjectTypeId = null, $Option = null)
        {
    
            $Stage = new Stage('Check-Listen', 'Ein Object einer Check-Liste hinzufügen');
    
    
    Severity: Minor
    Found in Application/Reporting/CheckList/Frontend.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 frontendListObjectSelect has 427 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function frontendListObjectSelect(
            $ListId = null,
            $ObjectTypeId = null,
            $ObjectTypeSelect = null
        ) {
    Severity: Major
    Found in Application/Reporting/CheckList/Frontend.php - About 2 days to fix

      Method frontendListObjectElementShow has 403 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function frontendListObjectElementShow
          (
              $Id = null,
              $Filter = null,
      //        $Data = null,
      Severity: Major
      Found in Application/Reporting/CheckList/Frontend.php - About 2 days to fix

        Method frontendListObjectAdd has 175 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function frontendListObjectAdd($ListId = null, $ObjectId = null, $ObjectTypeId = null, $Option = null)
            {
        
                $Stage = new Stage('Check-Listen', 'Ein Object einer Check-Liste hinzufügen');
        
        
        Severity: Major
        Found in Application/Reporting/CheckList/Frontend.php - About 7 hrs to fix

          Function frontendListObjectElementEdit has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              public function frontendListObjectElementEdit(
                  $ObjectId = null,
                  $ListId = null,
                  $ObjectTypeId = null,
                  $Data = null,
          Severity: Minor
          Found in Application/Reporting/CheckList/Frontend.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 formCheckListFilter has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
          Open

              private function formCheckListFilter(
                  $filterPersonObjectList
              ) {
          
                  $yearAll = array();
          Severity: Minor
          Found in Application/Reporting/CheckList/Frontend.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

          Method frontendListObjectElementEdit has 100 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendListObjectElementEdit(
                  $ObjectId = null,
                  $ListId = null,
                  $ObjectTypeId = null,
                  $Data = null,
          Severity: Major
          Found in Application/Reporting/CheckList/Frontend.php - About 4 hrs to fix

            Method frontendListElementSelect has 87 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendListElementSelect($Id = null, $Element = null)
                {
            
                    $Stage = new Stage('Check-Listen', 'Elemente einer Check-Liste zuordnen');
            
            
            Severity: Major
            Found in Application/Reporting/CheckList/Frontend.php - About 3 hrs to fix

              Method frontendDestroyList has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendDestroyList($Id = null, $Confirm = false)
                  {
              
                      $Stage = new Stage('Check-List', 'Löschen');
                      if ($Id) {
              Severity: Major
              Found in Application/Reporting/CheckList/Frontend.php - About 2 hrs to fix

                Method formCheckListFilter has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function formCheckListFilter(
                        $filterPersonObjectList
                    ) {
                
                        $yearAll = array();
                Severity: Major
                Found in Application/Reporting/CheckList/Frontend.php - About 2 hrs to fix

                  Method frontendList has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendList($List = null)
                      {
                  
                          $Stage = new Stage('Check-Listen', 'Übersicht');
                  
                  
                  Severity: Major
                  Found in Application/Reporting/CheckList/Frontend.php - About 2 hrs to fix

                    Method frontendListEdit has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function frontendListEdit($Id = null, $List = null)
                        {
                    
                            $Stage = new Stage('Check-List', 'Bearbeiten');
                            $Stage->addButton(
                    Severity: Minor
                    Found in Application/Reporting/CheckList/Frontend.php - About 1 hr to fix

                      Method frontendListElementEdit has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendListElementEdit($Id = null, $ElementId = null, $ElementName = null)
                          {
                      
                              $Stage = new Stage('Name des Elements', 'bearbeiten');
                              $tblList = ( $Id !== null ? CheckList::useService()->getListById($Id) : false );
                      Severity: Minor
                      Found in Application/Reporting/CheckList/Frontend.php - About 1 hr to fix

                        Function frontendListElementSelect has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function frontendListElementSelect($Id = null, $Element = null)
                            {
                        
                                $Stage = new Stage('Check-Listen', 'Elemente einer Check-Liste zuordnen');
                        
                        
                        Severity: Minor
                        Found in Application/Reporting/CheckList/Frontend.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 frontendListObjectElementEdit has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $ObjectId = null,
                                $ListId = null,
                                $ObjectTypeId = null,
                                $Data = null,
                                $YearPersonId = null,
                        Severity: Major
                        Found in Application/Reporting/CheckList/Frontend.php - About 1 hr to fix

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

                              public function frontendDestroyList($Id = null, $Confirm = false)
                              {
                          
                                  $Stage = new Stage('Check-List', 'Löschen');
                                  if ($Id) {
                          Severity: Minor
                          Found in Application/Reporting/CheckList/Frontend.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

                          Avoid deeply nested control flow statements.
                          Open

                                                              if ($tblPerson) {
                                                                  $tblGroupList = Group::useService()->getGroupAllByPerson($tblPerson);
                                                                  if ($tblGroupList) {
                                                                      foreach ($tblGroupList as $tblGroup) {
                                                                          $tblGroupCommon = Group::useService()->getGroupByMetaTable('COMMON');
                          Severity: Major
                          Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if ($tblObjectType->getIdentifier() === 'PERSON') {
                                                            foreach ($objects as $objectId => $value) {
                                                                $countTotalPerson++;
                                                                $tblPerson = Person::useService()->getPersonById($objectId);
                                                                if ($tblPerson) {
                            Severity: Major
                            Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                          if ($tblListObjectElementList->getValue() == 1) {
                                                                              $list[$count]['Field'.$tblListElementList->getId()] = new Center(new SuccessIcon());
                                                                          }
                              Severity: Major
                              Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                            if ($tblProspectReservation) {
                                                                                $level = $tblProspectReservation->getReservationDivision();
                                                                                $year = $tblProspectReservation->getReservationYear();
                                                                                $optionA = $tblProspectReservation->getServiceTblTypeOptionA();
                                                                                $optionB = $tblProspectReservation->getServiceTblTypeOptionB();
                                Severity: Major
                                Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                              if (( $tblAddress = Address::useService()->getAddressByPerson($tblPerson) )) {
                                                                                  $Address = $tblAddress->getGuiTwoRowString();
                                                                              }
                                  Severity: Major
                                  Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                        if ($tblGroupList) {
                                                                            foreach ($tblGroupList as $tblGroup) {
                                                                                $tblGroupCommon = CompanyGroup::useService()->getGroupByMetaTable('COMMON');
                                                                                if ($tblGroupCommon->getId() != $tblGroup->getId()) {
                                                                                    $groups[] = $tblGroup->getName();
                                    Severity: Major
                                    Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                                  if(($tblToPhoneList = Phone::useService()->getPhoneAllByPerson($tblPerson))) {
                                                                                      $ProspectPhoneList = array();
                                                                                      foreach ($tblToPhoneList as $tblToPhone) {
                                                                                          if (($tblPhone = $tblToPhone->getTblPhone())) {
                                                                                              $ProspectPhoneList[] = $tblPhone->getNumber()
                                      Severity: Major
                                      Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                    if ($guardianList) {
                                                                                        foreach ($guardianList as $guardian) {
                                                                                            $tblPersonGuardian = $guardian->getServiceTblPersonFrom();
                                                                                            if ($tblPersonGuardian && $guardian->getTblType()->getId() == 1) {
                                                                                                // get PhoneNumber by Guardian
                                        Severity: Major
                                        Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                                      if ($tblListObjectElementList->getValue() === "0") {
                                                                                          $list[$count]['Field'.$tblListElementList->getId()] = ' '.$tblListObjectElementList->getValue();
                                                                                      }
                                          Severity: Major
                                          Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                                    if (!$hasFilter) {
                                                                                        $filterPersonObjectList[$tblPerson->getId()] = $tblPerson;
                                                                                    }
                                            Severity: Major
                                            Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

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

                                                      $Id = null,
                                                      $Filter = null,
                                              //        $Data = null,
                                              //        $HasData = null,
                                                      $YearPersonId = null,
                                              Severity: Minor
                                              Found in Application/Reporting/CheckList/Frontend.php - About 45 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                            return $Stage.new Success(new SuccessIcon().
                                                                                    ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                                                    array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                Severity: Major
                                                Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                          return $Stage;
                                                  Severity: Major
                                                  Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return $Stage . new Danger(new Ban() .
                                                                                ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                            .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                    Severity: Major
                                                    Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                                  return $Stage . new Danger(new Ban() .
                                                                                          ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                      .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                          array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                      Severity: Major
                                                      Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                                return $Stage.new Success(new SuccessIcon().
                                                                                        ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                    .new Success(new SuccessIcon().$countAdd.' Institution/en hinzugefügt.')
                                                                                    .( $countExists > 0 ? new Warning($countExists.' Institution/en existierten bereits in der Check-Liste') : '' )
                                                                                    .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                        Severity: Major
                                                        Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                                  return $Stage.new Success(new SuccessIcon().
                                                                                          ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                      .new Success(new SuccessIcon().$countAdd.' Person/en hinzugefügt.')
                                                                                      .( $countExists > 0 ? new Warning($countExists.' Person/en existierten bereits in der Check-Liste') : '' )
                                                                                      .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                          Severity: Major
                                                          Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                        return $Stage.new Success(new SuccessIcon().
                                                                                                ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                            .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                                                                array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                            Severity: Major
                                                            Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return $Stage . new Danger(new Ban() .
                                                                                          ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                      .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                          array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                              Severity: Major
                                                              Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return $Stage . new Danger(new Ban() .
                                                                                        ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                    .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                        array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                                Severity: Major
                                                                Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                          return $Stage.new Success(new SuccessIcon().
                                                                                                  ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                              .new Success(new SuccessIcon().$countAdd.' Person/en hinzugefügt.')
                                                                                              .( $countExists > 0 ? new Warning($countExists.' Person/en existierten bereits in der Check-Liste') : '' )
                                                                                              .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                                  Severity: Major
                                                                  Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                            return $Stage;
                                                                    Severity: Major
                                                                    Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                                  return $Stage . new Danger(new Ban() .
                                                                                                          ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                                      .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                                          array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                                      Severity: Major
                                                                      Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                                    return $Stage . new Danger(new Ban() .
                                                                                                            ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                                        .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                                            array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                                        Severity: Major
                                                                        Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                                                  return $ObjectA->getId() - $ObjectB->getId();
                                                                          Severity: Major
                                                                          Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                                        return $Stage.new Success(new SuccessIcon().
                                                                                                                ' Die '.$tblObjectType->getName().' ist zur Check-Liste hinzugefügt worden.')
                                                                                                            .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_SUCCESS,
                                                                                                                array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                                            Severity: Major
                                                                            Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                                  return $Stage . new Danger(new Ban() .
                                                                                                          ' Die '.$tblObjectType->getName().' konnte zur Check-Liste nicht hinzugefügt werden.')
                                                                                                      .new Redirect('/Reporting/CheckList/Object/Select', Redirect::TIMEOUT_ERROR,
                                                                                                          array('ListId' => $tblList->getId(), 'ObjectTypeId' => $tblObjectType->getId()));
                                                                              Severity: Major
                                                                              Found in Application/Reporting/CheckList/Frontend.php - About 30 mins to fix

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

                                                                                    public function frontendDestroyList($Id = null, $Confirm = false)
                                                                                    {
                                                                                
                                                                                        $Stage = new Stage('Check-List', 'Löschen');
                                                                                        if ($Id) {
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 3 days to fix
                                                                                Application/Reporting/SerialLetter/Frontend.php on lines 3014..3079

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

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

                                                                                            } elseif ($tblObjectType->getIdentifier() === 'COMPANYGROUP') {
                                                                                                $tblCompanyGroup = CompanyGroup::useService()->getGroupById($ObjectId);
                                                                                                if ($tblCompanyGroup) {
                                                                                                    if (isset($Option[$tblCompanyGroup->getId()])) {
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 2 other locations - About 2 days to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1053..1101
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1150..1198

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

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

                                                                                            } elseif ($tblObjectType->getIdentifier() === 'DIVISIONGROUP') {
                                                                                                $tblDivision = Division::useService()->getDivisionById($ObjectId);
                                                                                                if ($tblDivision) {
                                                                                                    if (isset($Option[$tblDivision->getId()])) {
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 2 other locations - About 2 days to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1053..1101
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1101..1150

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

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

                                                                                            } elseif ($tblObjectType->getIdentifier() === 'PERSONGROUP') {
                                                                                                $tblPersonGroup = PersonGroup::useService()->getGroupById($ObjectId);
                                                                                                if ($tblPersonGroup) {
                                                                                                    if (isset($Option[$tblPersonGroup->getId()])) {
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 2 other locations - About 2 days to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1101..1150
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1150..1198

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

                                                                                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

                                                                                                        } elseif ($tblObjectType->getIdentifier() === 'PERSONGROUP') {
                                                                                
                                                                                                            $tblPersonGroupAll = PersonGroup::useService()->getGroupAll();
                                                                                                            $tblPersonGroupInList = CheckList::useService()->getObjectAllByListAndObjectType($tblList,
                                                                                                                $tblObjectType);
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 1 day to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 817..862

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

                                                                                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

                                                                                                        } elseif ($tblObjectType->getIdentifier() === 'COMPANYGROUP') {
                                                                                
                                                                                                            $tblCompanyGroupAll = CompanyGroup::useService()->getGroupAll();
                                                                                                            $tblCompanyGroupInList = CheckList::useService()->getObjectAllByListAndObjectType($tblList,
                                                                                                                $tblObjectType);
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 1 day to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 772..817

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

                                                                                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 ($tblObjectType->getIdentifier() === 'PERSON') {
                                                                                                $tblPerson = Person::useService()->getPersonById($ObjectId);
                                                                                                if ($tblPerson) {
                                                                                                    if (CheckList::useService()->addObjectToList($tblList, $tblObjectType, $tblPerson)) {
                                                                                                        return $Stage.new Success(new SuccessIcon().
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 5 hrs to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1039..1053

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

                                                                                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

                                                                                            } elseif ($tblObjectType->getIdentifier() === 'COMPANY') {
                                                                                                $tblCompany = Company::useService()->getCompanyById($ObjectId);
                                                                                                if ($tblCompany) {
                                                                                                    if (CheckList::useService()->addObjectToList($tblList, $tblObjectType, $tblCompany)) {
                                                                                                        return $Stage.new Success(new SuccessIcon().
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 5 hrs to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1025..1198

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

                                                                                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 ($LevelPersonId !== null) {
                                                                                            $Global = $this->getGlobal();
                                                                                            $Global->POST['Filter']['Level'] = $LevelPersonId;
                                                                                            $Global->savePost();
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 2 hrs to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1272..1288

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

                                                                                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 ($YearPersonId !== null) {
                                                                                            $Global = $this->getGlobal();
                                                                                            $Global->POST['Filter']['Year'] = $YearPersonId;
                                                                                            $Global->savePost();
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 2 hrs to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 1289..1305

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

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

                                                                                                                            if ($tblProspectReservation) {
                                                                                                                                $level = $tblProspectReservation->getReservationDivision();
                                                                                                                                $year = $tblProspectReservation->getReservationYear();
                                                                                                                                $optionA = $tblProspectReservation->getServiceTblTypeOptionA();
                                                                                                                                $optionB = $tblProspectReservation->getServiceTblTypeOptionB();
                                                                                Severity: Major
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 2 other locations - About 1 hr to fix
                                                                                Application/People/Search/Group/Frontend.php on lines 122..134
                                                                                Application/Reporting/CheckList/Service.php on lines 1068..1080

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

                                                                                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

                                                                                                                        'Option'      => ( new Form(
                                                                                                                            new FormGroup(
                                                                                                                                new FormRow(array(
                                                                                                                                    new FormColumn(
                                                                                                                                        new Primary('Hinzufügen',
                                                                                Severity: Minor
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 40 mins to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 754..768

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

                                                                                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

                                                                                                                        'Option'      => ( new Form(
                                                                                                                            new FormGroup(
                                                                                                                                new FormRow(array(
                                                                                                                                    new FormColumn(
                                                                                                                                        new Primary('Hinzufügen',
                                                                                Severity: Minor
                                                                                Found in Application/Reporting/CheckList/Frontend.php and 1 other location - About 40 mins to fix
                                                                                Application/Reporting/CheckList/Frontend.php on lines 699..713

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

                                                                                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