DerDu/SPHERE-Framework

View on GitHub
Application/Reporting/Standard/Person/Service.php

Summary

Maintainability
F
1 mo
Test Coverage

Function getStudentTableContent has a Cognitive Complexity of 482 (exceeds 5 allowed). Consider refactoring.
Open

    public function getStudentTableContent($Result, $Option = null, $PersonGroup = null)
    {

        $SearchResult = array();
        if (!empty($Result)) {
Severity: Minor
Found in Application/Reporting/Standard/Person/Service.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

File Service.php has 2714 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Reporting\Standard\Person;

use MOC\V\Component\Document\Component\Bridge\Repository\PhpExcel;
Severity: Major
Found in Application/Reporting/Standard/Person/Service.php - About 1 wk to fix

    Method getStudentTableContent has 366 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getStudentTableContent($Result, $Option = null, $PersonGroup = null)
        {
    
            $SearchResult = array();
            if (!empty($Result)) {
    Severity: Major
    Found in Application/Reporting/Standard/Person/Service.php - About 1 day to fix

      Method createGroupList has 249 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createGroupList(TblGroup $tblGroup)
          {
      
              $tblPersonList = Group::useService()->getPersonAllByGroup($tblGroup);
              $TableContent = array();
      Severity: Major
      Found in Application/Reporting/Standard/Person/Service.php - About 1 day to fix

        Function createGroupListExcel has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
        Open

            public function createGroupListExcel($PersonList, $tblPersonList, $GroupId)
            {
        
                $tblGroup = Group::useService()->getGroupById($GroupId);
                if (!empty($PersonList) && $tblGroup) {
        Severity: Minor
        Found in Application/Reporting/Standard/Person/Service.php - About 1 day 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 createClassList has 219 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createClassList(TblDivision $tblDivision)
            {
        
                $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
        
        
        Severity: Major
        Found in Application/Reporting/Standard/Person/Service.php - About 1 day to fix

          Method createInterestedPersonList has 208 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createInterestedPersonList()
              {
          
                  $tblPersonList = Group::useService()->getPersonAllByGroup(Group::useService()->getGroupByMetaTable('PROSPECT'));
                  $TableContent = array();
          Severity: Major
          Found in Application/Reporting/Standard/Person/Service.php - About 1 day to fix

            Function createMedicalInsuranceClassListExcel has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
            Open

                public function createMedicalInsuranceClassListExcel($PersonList, $tblPersonList)
                {
            
                    if (!empty($PersonList)) {
            
            
            Severity: Minor
            Found in Application/Reporting/Standard/Person/Service.php - About 7 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 createGroupListExcel has 148 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function createGroupListExcel($PersonList, $tblPersonList, $GroupId)
                {
            
                    $tblGroup = Group::useService()->getGroupById($GroupId);
                    if (!empty($PersonList) && $tblGroup) {
            Severity: Major
            Found in Application/Reporting/Standard/Person/Service.php - About 5 hrs to fix

              Method createElectiveClassList has 123 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createElectiveClassList(TblDivision $tblDivision)
                  {
              
                      $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                      $TableContent = array();
              Severity: Major
              Found in Application/Reporting/Standard/Person/Service.php - About 4 hrs to fix

                Method createMedicalInsuranceClassList has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createMedicalInsuranceClassList(TblDivision $tblDivision)
                    {
                
                        $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                        $TableContent = array();
                Severity: Major
                Found in Application/Reporting/Standard/Person/Service.php - About 4 hrs to fix

                  Function createElectiveClassListExcel has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function createElectiveClassListExcel($PersonList, $tblPersonList, $DivisionId)
                      {
                  
                          // get PersonList sorted by GradeBook
                          if (!empty($PersonList)) {
                  Severity: Minor
                  Found in Application/Reporting/Standard/Person/Service.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 createMetaDataComparisonExcel has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function createMetaDataComparisonExcel($Person = null, $Year = null, $Division = null, $Option = null, $PersonGroup = null)
                      {
                  
                          $Result = $this->getStudentFilterResult($Person, $Year, $Division, $PersonGroup);
                  
                  
                  Severity: Major
                  Found in Application/Reporting/Standard/Person/Service.php - About 4 hrs to fix

                    Method createAgreementClassList has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function createAgreementClassList(TblDivision $tblDivision)
                        {
                    
                            $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                            $TableContent = array();
                    Severity: Major
                    Found in Application/Reporting/Standard/Person/Service.php - About 4 hrs to fix

                      Method createClassListExcel has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createClassListExcel($PersonList, $tblPersonList)
                          {
                      
                              if (!empty($PersonList)) {
                      
                      
                      Severity: Major
                      Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                        Method createExtendedClassList has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function createExtendedClassList(TblDivision $tblDivision)
                            {
                        
                                $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                                $TableContent = array();
                        Severity: Major
                        Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                          Method createInterestedPersonListExcel has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function createInterestedPersonListExcel($PersonList, $tblPersonList)
                              {
                          
                                  if (!empty($PersonList)) {
                          
                          
                          Severity: Major
                          Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                            Method createExtendedClassListExcel has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function createExtendedClassListExcel($PersonList, $tblPersonList)
                                {
                            
                                    if (!empty($PersonList)) {
                            
                            
                            Severity: Major
                            Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                              Method createElectiveClassListExcel has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function createElectiveClassListExcel($PersonList, $tblPersonList, $DivisionId)
                                  {
                              
                                      // get PersonList sorted by GradeBook
                                      if (!empty($PersonList)) {
                              Severity: Major
                              Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                                Function createClassListExcel has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function createClassListExcel($PersonList, $tblPersonList)
                                    {
                                
                                        if (!empty($PersonList)) {
                                
                                
                                Severity: Minor
                                Found in Application/Reporting/Standard/Person/Service.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 createMedicalInsuranceClassListExcel has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function createMedicalInsuranceClassListExcel($PersonList, $tblPersonList)
                                    {
                                
                                        if (!empty($PersonList)) {
                                
                                
                                Severity: Major
                                Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                                  Function getPhoneList has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private function getPhoneList(TblPerson $tblPerson, $IsExcel = false)
                                      {
                                  
                                          $tblToPersonList = Phone::useService()->getPhoneAllByPerson($tblPerson);
                                  
                                  
                                  Severity: Minor
                                  Found in Application/Reporting/Standard/Person/Service.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 getStudentFilterResult has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getStudentFilterResult($Person, $Year, $Division, $PersonGroup)
                                      {
                                  
                                          $Pile = new Pile(Pile::JOIN_TYPE_INNER);
                                          $Pile->addPile((new ViewPerson())->getViewService(), new ViewPerson(),
                                  Severity: Major
                                  Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

                                    Service has 25 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Service extends Extension
                                    {
                                    
                                        /**
                                         * @param IFormInterface|null $Stage
                                    Severity: Minor
                                    Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

                                      Method createBirthdayClassList has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function createBirthdayClassList(TblDivision $tblDivision)
                                          {
                                      
                                              $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                                      
                                      
                                      Severity: Major
                                      Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

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

                                            public function createAgreementClassListExcel($PersonList, $tblPersonList)
                                            {
                                        
                                                if (!empty($PersonList)) {
                                        
                                        
                                        Severity: Major
                                        Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

                                          Method createAbsenceListExcel has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              public function createAbsenceListExcel(\DateTime $dateTime, $Type = null, $DivisionName = '')
                                              {
                                          
                                                  if ($Type != null) {
                                                      $tblType = Type::useService()->getTypeById($Type);
                                          Severity: Minor
                                          Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

                                            Function createExtendedClassListExcel has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                public function createExtendedClassListExcel($PersonList, $tblPersonList)
                                                {
                                            
                                                    if (!empty($PersonList)) {
                                            
                                            
                                            Severity: Minor
                                            Found in Application/Reporting/Standard/Person/Service.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 createMedicalRecordClassList has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                public function createMedicalRecordClassList(TblDivision $tblDivision)
                                                {
                                            
                                                    $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                                                    $TableContent = array();
                                            Severity: Minor
                                            Found in Application/Reporting/Standard/Person/Service.php - About 1 hr to fix

                                              Method getPhoneList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  private function getPhoneList(TblPerson $tblPerson, $IsExcel = false)
                                                  {
                                              
                                                      $tblToPersonList = Phone::useService()->getPhoneAllByPerson($tblPerson);
                                              
                                              
                                              Severity: Minor
                                              Found in Application/Reporting/Standard/Person/Service.php - About 1 hr to fix

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

                                                    public function createMedicalRecordClassListExcel($PersonList, $tblPersonList)
                                                    {
                                                
                                                        if (!empty($PersonList)) {
                                                
                                                
                                                Severity: Minor
                                                Found in Application/Reporting/Standard/Person/Service.php - About 1 hr to fix

                                                  Method createBirthdayClassListExcel has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      public function createBirthdayClassListExcel($PersonList, $tblPersonList)
                                                      {
                                                  
                                                          if (!empty($PersonList)) {
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in Application/Reporting/Standard/Person/Service.php - About 1 hr to fix

                                                    Function getStudentFilterResult has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public function getStudentFilterResult($Person, $Year, $Division, $PersonGroup)
                                                        {
                                                    
                                                            $Pile = new Pile(Pile::JOIN_TYPE_INNER);
                                                            $Pile->addPile((new ViewPerson())->getViewService(), new ViewPerson(),
                                                    Severity: Minor
                                                    Found in Application/Reporting/Standard/Person/Service.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 createAbsenceListExcel has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public function createAbsenceListExcel(\DateTime $dateTime, $Type = null, $DivisionName = '')
                                                        {
                                                    
                                                            if ($Type != null) {
                                                                $tblType = Type::useService()->getTypeById($Type);
                                                    Severity: Minor
                                                    Found in Application/Reporting/Standard/Person/Service.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 createMetaDataComparisonExcel has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public function createMetaDataComparisonExcel($Person = null, $Year = null, $Division = null, $Option = null, $PersonGroup = null)
                                                        {
                                                    
                                                            $Result = $this->getStudentFilterResult($Person, $Year, $Division, $PersonGroup);
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in Application/Reporting/Standard/Person/Service.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 (is_numeric($Year) && is_numeric($Month) && is_numeric($Day)) {
                                                                                    $Item['BirthdayYearSort'] = ($Year * 10000) + ($Month * 100) + $Day;
                                                                                }
                                                    Severity: Major
                                                    Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                          if ($tblMail) {
                                                                                              $MailListSimple[$tblMail->getId()] = $tblMail->getAddress();
                                                                                              if (isset($tblMailList[$tblPersonGuardian->getId()])) {
                                                                                                  $tblMailList[$tblPersonGuardian->getId()] = $tblMailList[$tblPersonGuardian->getId()].', '
                                                                                                      .$tblMail->getAddress();
                                                      Severity: Major
                                                      Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                            if ($tblPhone) {
                                                                                                if (!$FirstNumber) {
                                                                                                    $tblPhoneList[$key] .= ', '
                                                                                                        . $tblPhone->getNumber() . ' ' . $this->getShortTypeByTblToPersonPhone($tblToPersonPhone);
                                                                                                } else {
                                                        Severity: Major
                                                        Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                          if (isset($tblPhoneList[$key])) {
                                                                                              $tblPhoneList[$key] .= ')';
                                                                                          }
                                                          Severity: Major
                                                          Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                        if (!empty($tblCommonBirthDates->getBirthplace())) {
                                                                                            $DataPerson['BirthPlace'] = $tblCommonBirthDates->getBirthplace();
                                                                                        }
                                                            Severity: Major
                                                            Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                          if (($tblLevelTill = $tblStudentSubject->getServiceTblLevelTill()) &&
                                                                                              ($LevelTill = Division::useService()->getLevelById($tblLevelTill->getId())->getName())
                                                                                              && (is_numeric($LevelTill)) && (is_numeric($tblDivisionLevel->getName()))) {
                                                                                              if ($tblDivisionLevel->getName() > $LevelTill) {
                                                                                                  $Item['ForeignLanguage' . $i] = '';
                                                              Severity: Major
                                                              Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                            if (($tblCommonGender = $tblCommonBirthDates->getTblCommonGender())) {
                                                                                                $DataPerson['Gender'] = $tblCommonGender->getName();
                                                                                            }
                                                                Severity: Major
                                                                Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                                  switch ($tblAgreementType->getName()) {
                                                                                                      case 'in Schulschriften':
                                                                                                          ($CategoryString == 'Foto des SchĂĽlers'
                                                                                                              ? $Item['PictureSchoolWriting'] = $MarkValue
                                                                                                              : $Item['NameSchoolWriting'] = $MarkValue);
                                                                  Severity: Major
                                                                  Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                                if (!empty($tblCommonBirthDates->getBirthday())) {
                                                                                                    $DataPerson['Birthday'] = $tblCommonBirthDates->getBirthday();
                                                                                                }
                                                                    Severity: Major
                                                                    Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                                      if ($tblType->getName() == 'Geschwisterkind') {
                                                                                                          if (($tblPersonFrom = $tblToPerson->getServiceTblPersonFrom()) && ($tblPersonTo = $tblToPerson->getServiceTblPersonTo())) {
                                                                                                              if ($tblPersonFrom->getId() !== $tblPerson->getId()) {
                                                                                                                  $tblPersonSibling = $tblPersonFrom;
                                                                                                              } elseif ($tblPersonTo->getId() !== $tblPerson->getId()) {
                                                                      Severity: Major
                                                                      Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                                        if ($tblDivision->getTblLevel() && $tblDivision->getTblLevel()->getName() != '') {
                                                                                                            $Item['SchoolType'] = $tblDivision->getTypeName();
                                                                                                        }
                                                                        Severity: Major
                                                                        Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                          if ($tblToPhoneList) {
                                                                                                              foreach ($tblToPhoneList as $tblToPhone) {
                                                                                                                  if (($tblPhone = $tblToPhone->getTblPhone())) {
                                                                                                                      $PhoneGuardianListSimple[$tblPhone->getId()] = $tblPhone->getNumber();
                                                                                                                      if (!isset($Item['PhoneGuardian'][$tblPersonGuardian->getId()])) {
                                                                          Severity: Major
                                                                          Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                        if ($tblCourse) {
                                                                                                            if ($tblCourse->getName() == 'Gymnasium') {
                                                                                                                $Item['Education'] = 'GY';
                                                                                                            } elseif ($tblCourse->getName() == 'Hauptschule') {
                                                                                                                $Item['Education'] = 'HS';
                                                                            Severity: Major
                                                                            Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                                  switch($tblStudentAgreement->getTblStudentAgreementType()->getName()){
                                                                                                                      case 'in Schulschriften':
                                                                                                                          $Item['Picture1'] = 'Ja';
                                                                                                                      break;
                                                                                                                      case 'in Veröffentlichungen':
                                                                              Severity: Major
                                                                              Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                            if($tblRelationshipCustody
                                                                                                                && ($tblPersonCustody = $tblRelationshipCustody->getServiceTblPersonFrom())){
                                                                                                                $DataPerson['Custody_'.$i.'_Salutation'] = $tblPersonCustody->getSalutation();
                                                                                                                $DataPerson['Custody_'.$i.'_Title'] = $tblPersonCustody->getTitle();
                                                                                                                $DataPerson['Custody_'.$i.'_FirstName'] = $tblPersonCustody->getFirstName();
                                                                                Severity: Major
                                                                                Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                                      switch($tblStudentAgreement->getTblStudentAgreementType()->getName()){
                                                                                                                          case 'in Schulschriften':
                                                                                                                              $Item['Name1'] = 'Ja';
                                                                                                                          break;
                                                                                                                          case 'in Veröffentlichungen':
                                                                                  Severity: Major
                                                                                  Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                                    if (isset($tblMailList[$key])) {
                                                                                                                        $tblMailList[$key] .= ')';
                                                                                                                    }
                                                                                    Severity: Major
                                                                                    Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                                      if($tblRelationshipCustodyControl->getRanking() == $i || $i == 1
                                                                                                                          && $tblRelationshipCustodyControl->getRanking() === null){
                                                                                                                          $tblRelationshipCustody = $tblRelationshipCustodyControl;
                                                                                                                          break;
                                                                                                                      }
                                                                                      Severity: Major
                                                                                      Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                    if (is_numeric($Month) && is_numeric($Day)) {
                                                                                                                        $Item['BirthdaySort'] = $Month * 100 + $Day;
                                                                                                                    }
                                                                                        Severity: Major
                                                                                        Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                          if (isset($tblMailList[$tblPersonGuardian->getId()])) {
                                                                                                                              $tblMailList[$tblPersonGuardian->getId()] .= ')';
                                                                                                                          }
                                                                                          Severity: Major
                                                                                          Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                            if ($PhoneDescription == 'Festnetz') {
                                                                                                                                switch ($PhoneName) {
                                                                                                                                    case 'Privat':
                                                                                                                                        if (empty($DataPerson['PhoneFixedPrivate'])) {
                                                                                                                                            $DataPerson['PhoneFixedPrivate'] = $tblPhone->getNumber()
                                                                                            Severity: Major
                                                                                            Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                                  if ($tblMail) {
                                                                                                                                      if (isset($tblMailList[$key])) {
                                                                                                                                          $tblMailList[$key] = $tblMailList[$key] . ', '
                                                                                                                                              . $tblMail->getAddress();
                                                                                                                                      } else {
                                                                                              Severity: Major
                                                                                              Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                            if (($tblLevelFrom = $tblStudentSubject->getServiceTblLevelFrom())
                                                                                                                                && ($LevelFrom = Division::useService()->getLevelById($tblLevelFrom->getId())->getName())
                                                                                                                                && (is_numeric($LevelFrom)) && (is_numeric($tblDivisionLevel->getName()))) {
                                                                                                                                if ($tblDivisionLevel->getName() < $LevelFrom) {
                                                                                                                                    $Item['ForeignLanguage' . $i] = '';
                                                                                                Severity: Major
                                                                                                Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                                  if (isset($Item['PhoneGuardian'][$tblPersonGuardian->getId()])) {
                                                                                                                                      $Item['PhoneGuardian'][$tblPersonGuardian->getId()] .= ')';
                                                                                                                                  }
                                                                                                  Severity: Major
                                                                                                  Found in Application/Reporting/Standard/Person/Service.php - About 45 mins to fix

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

                                                                                                        public function createMetaDataComparisonExcel($Person = null, $Year = null, $Division = null, $Option = null, $PersonGroup = null)
                                                                                                    Severity: Minor
                                                                                                    Found in Application/Reporting/Standard/Person/Service.php - About 35 mins to fix

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

                                                                                                          public function getShortTypeByTblToPersonPhone(TblToPersonPhone $tblToPerson)
                                                                                                          {
                                                                                                      
                                                                                                              $result = '';
                                                                                                              $tblType = $tblToPerson->getTblType();
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Reporting/Standard/Person/Service.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 2 locations. Consider refactoring.
                                                                                                      Open

                                                                                                                                      } elseif ($PhoneDescription == 'Mobil') {
                                                                                                                                          switch ($PhoneName) {
                                                                                                                                              case 'Privat':
                                                                                                                                                  if (empty($DataPerson['PhoneMobilePrivate'])) {
                                                                                                                                                      $DataPerson['PhoneMobilePrivate'] = $tblPhone->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 1 day to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2506..2566

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

                                                                                                      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 ($PhoneDescription == 'Festnetz') {
                                                                                                                                          switch ($PhoneName) {
                                                                                                                                              case 'Privat':
                                                                                                                                                  if (empty($DataPerson['PhoneFixedPrivate'])) {
                                                                                                                                                      $DataPerson['PhoneFixedPrivate'] = $tblPhone->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 1 day to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2536..2566

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

                                                                                                      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 (($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
                                                                                                                      $tblDivisionCustodyList = Division::useService()->getCustodyAllByDivision($tblDivision);
                                                                                                                      if ($tblDivisionCustodyList) {
                                                                                                                          foreach ($tblDivisionCustodyList as $tblPerson) {
                                                                                                                              $custodyList[] = trim($tblPerson->getSalutation() . ' ' . $tblPerson->getLastName());
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 7 hrs to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1514..1534

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

                                                                                                      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 ($tblStudentElectiveList) {
                                                                                                                              foreach ($tblStudentElectiveList as $tblStudentElective) {
                                                                                                                                  if ($tblStudentElective->getServiceTblSubject()) {
                                                                                                                                      $tblSubjectRanking = $tblStudentElective->getTblStudentSubjectRanking();
                                                                                                                                      if ($tblSubjectRanking) {
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 3 hrs to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1395..1417

                                                                                                      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

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

                                                                                                                                  if ($Item['Phone'] == '') {
                                                                                                                                      $Item['Phone'] = $tblPerson->getFirstName() . ' ' . $tblPerson->getLastName() . ' (' . $tblPhone->getNumber() . ' ' .
                                                                                                                                          // modify TypeShort
                                                                                                                                          str_replace('.', '', Phone::useService()->getPhoneTypeShort($tblToPhone));
                                                                                                                                  } else {
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 2 hrs to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 713..721

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

                                                                                                      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 ($tblTransferType) {
                                                                                                                              $tblStudentTransfer = Student::useService()->getStudentTransferByType($tblStudent,
                                                                                                                                  $tblTransferType);
                                                                                                                              if ($tblStudentTransfer) {
                                                                                                                                  $tblCourse = $tblStudentTransfer->getServiceTblCourse();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 2 hrs to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1370..1387

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

                                                                                                      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($tblStudentAgreementCategory->getName() == 'Foto des SchĂĽlers') {
                                                                                                                                          switch($tblStudentAgreement->getTblStudentAgreementType()->getName()){
                                                                                                                                              case 'in Schulschriften':
                                                                                                                                                  $Item['Picture1'] = 'Ja';
                                                                                                                                              break;
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 2 hrs to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 3122..3146

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

                                                                                                      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

                                                                                                                                      } else {
                                                                                                                                          switch($tblStudentAgreement->getTblStudentAgreementType()->getName()){
                                                                                                                                              case 'in Schulschriften':
                                                                                                                                                  $Item['Name1'] = 'Ja';
                                                                                                                                              break;
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 2 hrs to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 3098..3146

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

                                                                                                      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 ($tblGroup->getMetaTable() == 'STUDENT') {
                                                                                                                      $ColumnCustom = array(
                                                                                                                          'Identifier'           => 'SchĂĽlernummer',
                                                                                                                          'School'               => 'Schule',
                                                                                                                          'SchoolType'           => 'Schulart',
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 1 hr to fix
                                                                                                      Application/Reporting/Standard/Person/Frontend.php on lines 785..807

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

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

                                                                                                                  if (isset($Division) && $Division) {
                                                                                                                      array_walk($Division, function (&$Input) {
                                                                                                      
                                                                                                                          if (!empty($Input)) {
                                                                                                                              $Input = explode(' ', $Input);
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 5 other locations - About 1 hr to fix
                                                                                                      Application/Api/MassReplace/StudentFilter.php on lines 251..264
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2319..2333
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2334..2348
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 358..371
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 373..386

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

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

                                                                                                                  if (isset($Person) && $Person) {
                                                                                                                      array_walk($Person, function (&$Input) {
                                                                                                      
                                                                                                                          if (!empty($Input)) {
                                                                                                                              $Input = explode(' ', $Input);
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 5 other locations - About 1 hr to fix
                                                                                                      Application/Api/MassReplace/StudentFilter.php on lines 251..264
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2334..2348
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2349..2363
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 358..371
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 373..386

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

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

                                                                                                                  if (isset($PersonGroup) && $PersonGroup) {
                                                                                                                      array_walk($PersonGroup, function (&$Input) {
                                                                                                      
                                                                                                                          if (!empty($Input)) {
                                                                                                                              $Input = explode(' ', $Input);
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 5 other locations - About 1 hr to fix
                                                                                                      Application/Api/MassReplace/StudentFilter.php on lines 251..264
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2319..2333
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2349..2363
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 358..371
                                                                                                      Application/Setting/User/Account/Frontend.php on lines 373..386

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

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

                                                                                                                      if ($tblToPersonAddress && ($tblAddress = $tblToPersonAddress->getTblAddress())) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 11 other locations - About 1 hr to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 209..217
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 347..355
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 539..547
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 643..651
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1002..1010
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 360..368
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 618..626
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 523..531
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 792..800
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1214..1222
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1658..1666

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

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

                                                                                                                      if ($tblToPersonAddress && ($tblAddress = $tblToPersonAddress->getTblAddress())) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 11 other locations - About 1 hr to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 209..217
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 347..355
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 539..547
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 643..651
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1002..1010
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 360..368
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 618..626
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 523..531
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 944..952
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1214..1222
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1658..1666

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

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

                                                                                                                      if ($tblToPersonAddress && ($tblAddress = $tblToPersonAddress->getTblAddress())) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 11 other locations - About 1 hr to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 209..217
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 347..355
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 539..547
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 643..651
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1002..1010
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 360..368
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 618..626
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 523..531
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 792..800
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 944..952
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1658..1666

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

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

                                                                                                                      if ($tblToPersonAddress && ($tblAddress = $tblToPersonAddress->getTblAddress())) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 11 other locations - About 1 hr to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 209..217
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 347..355
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 539..547
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 643..651
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1002..1010
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 360..368
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 618..626
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 523..531
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 792..800
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 944..952
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1214..1222

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

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

                                                                                                                      if ($tblToPersonAddress && ($tblAddress = $tblToPersonAddress->getTblAddress())) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 11 other locations - About 1 hr to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 209..217
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 347..355
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 539..547
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 643..651
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 1002..1010
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 360..368
                                                                                                      Application/Reporting/Custom/Herrnhut/Person/Service.php on lines 618..626
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 792..800
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 944..952
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1214..1222
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 1658..1666

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

                                                                                                      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 ($tblAddress) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 55 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 3153..3161

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

                                                                                                      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 ($tblAddress) {
                                                                                                                          $Item['StreetName'] = $tblAddress->getStreetName();
                                                                                                                          $Item['StreetNumber'] = $tblAddress->getStreetNumber();
                                                                                                                          $Item['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                          $Item['City'] = $tblAddress->getTblCity()->getName();
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 55 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2976..2984

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

                                                                                                      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 (($salutation = $guardian->getServiceTblPersonFrom()->getTblSalutation())) {
                                                                                                                                      if ($salutation->getId() == 1) {
                                                                                                                                          $father = $guardian->getServiceTblPersonFrom();
                                                                                                                                      } elseif ($salutation->getId() == 2) {
                                                                                                                                          $mother = $guardian->getServiceTblPersonFrom();
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 2 other locations - About 45 mins to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 62..74
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 761..773

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

                                                                                                                                                          case 'Geschäftlich':
                                                                                                                                                              if(!empty($DataPerson['Custody_'.$i.'_PhoneFixedWork'])){
                                                                                                                                                                  $DataPerson['Custody_'.$i.'_PhoneFixedWork'] .= ', ';
                                                                                                                                                              }
                                                                                                                                                              $DataPerson['Custody_'.$i.'_PhoneFixedWork'] .= $tblPhoneCustody->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 3 other locations - About 45 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2733..2739
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2743..2749
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2750..2756

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 95.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                                                          case 'Notfall':
                                                                                                                                                              if(!empty($DataPerson['Custody_'.$i.'_PhoneFixedEmergency'])){
                                                                                                                                                                  $DataPerson['Custody_'.$i.'_PhoneFixedEmergency'] .= ', ';
                                                                                                                                                              }
                                                                                                                                                              $DataPerson['Custody_'.$i.'_PhoneFixedEmergency'] .= $tblPhoneCustody->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 3 other locations - About 45 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2726..2732
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2743..2749
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2750..2756

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 95.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                                                          case 'Geschäftlich':
                                                                                                                                                              if(!empty($DataPerson['Custody_'.$i.'_PhoneMobileWork'])){
                                                                                                                                                                  $DataPerson['Custody_'.$i.'_PhoneMobileWork'] .= ', ';
                                                                                                                                                              }
                                                                                                                                                              $DataPerson['Custody_'.$i.'_PhoneMobileWork'] .= $tblPhoneCustody->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 3 other locations - About 45 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2726..2732
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2733..2739
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2743..2749

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 95.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                                                          case 'Privat':
                                                                                                                                                              if(!empty($DataPerson['Custody_'.$i.'_PhoneMobilePrivate'])){
                                                                                                                                                                  $DataPerson['Custody_'.$i.'_PhoneMobilePrivate'] .= ', ';
                                                                                                                                                              }
                                                                                                                                                              $DataPerson['Custody_'.$i.'_PhoneMobilePrivate'] .= $tblPhoneCustody->getNumber()
                                                                                                      Severity: Major
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 3 other locations - About 45 mins to fix
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2726..2732
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2733..2739
                                                                                                      Application/Reporting/Standard/Person/Service.php on lines 2750..2756

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 95.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          if ($tblProspectReservation) {
                                                                                                                              $Item['SchoolYear'] = $tblProspectReservation->getReservationYear();
                                                                                                                              if ($tblProspectReservation->getServiceTblTypeOptionA()) {
                                                                                                                                  $Item['TypeOptionA'] = $tblProspectReservation->getServiceTblTypeOptionA()->getName();
                                                                                                                              }
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Reporting/Standard/Person/Service.php and 1 other location - About 30 mins to fix
                                                                                                      Application/Reporting/Custom/Chemnitz/Person/Service.php on lines 656..667

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

                                                                                                      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