DerDu/SPHERE-Framework

View on GitHub
Application/Transfer/Import/Schneeberg/Service.php

Summary

Maintainability
F
2 mos
Test Coverage

Function createStudentsFromFile has a Cognitive Complexity of 636 (exceeds 5 allowed). Consider refactoring.
Open

    public function createStudentsFromFile(
        IFormInterface $Form = null,
        UploadedFile $File = null
    ) {

Severity: Minor
Found in Application/Transfer/Import/Schneeberg/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 2123 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Created by PhpStorm.
 * User: Kauschke
 * Date: 29.06.2016
Severity: Major
Found in Application/Transfer/Import/Schneeberg/Service.php - About 5 days to fix

    Function createStudentsPrimarySchoolFromFile has a Cognitive Complexity of 233 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createStudentsPrimarySchoolFromFile(
            IFormInterface $Form = null,
            UploadedFile $File = null
        ) {
    
    
    Severity: Minor
    Found in Application/Transfer/Import/Schneeberg/Service.php - About 4 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function createInterestedPersonsFromFile has a Cognitive Complexity of 200 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createInterestedPersonsFromFile(
            IFormInterface $Form = null,
            UploadedFile $File = null
        ) {
    
    
    Severity: Minor
    Found in Application/Transfer/Import/Schneeberg/Service.php - About 4 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method createStudentsFromFile has 775 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createStudentsFromFile(
            IFormInterface $Form = null,
            UploadedFile $File = null
        ) {
    
    
    Severity: Major
    Found in Application/Transfer/Import/Schneeberg/Service.php - About 3 days to fix

      Function createContactsFromFile has a Cognitive Complexity of 188 (exceeds 5 allowed). Consider refactoring.
      Open

          public
          function createContactsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      Severity: Minor
      Found in Application/Transfer/Import/Schneeberg/Service.php - About 3 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function createStaffsFromFile has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createStaffsFromFile(IFormInterface $Form = null, UploadedFile $File = null)
          {
      
              /**
               * Skip to Frontend
      Severity: Minor
      Found in Application/Transfer/Import/Schneeberg/Service.php - About 2 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function createCustodiesFromFile has a Cognitive Complexity of 133 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createCustodiesFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null,
              $IsMother = null
          ) {
      Severity: Minor
      Found in Application/Transfer/Import/Schneeberg/Service.php - About 2 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method createInterestedPersonsFromFile has 336 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createInterestedPersonsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      
      
      Severity: Major
      Found in Application/Transfer/Import/Schneeberg/Service.php - About 1 day to fix

        Method createStudentsPrimarySchoolFromFile has 252 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createStudentsPrimarySchoolFromFile(
                IFormInterface $Form = null,
                UploadedFile $File = null
            ) {
        
        
        Severity: Major
        Found in Application/Transfer/Import/Schneeberg/Service.php - About 1 day to fix

          Function createCompaniesFromFile has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createCompaniesFromFile(
                  IFormInterface $Form = null,
                  UploadedFile $File = null
              ) {
          
          
          Severity: Minor
          Found in Application/Transfer/Import/Schneeberg/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 createCustodiesFromFile has 204 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createCustodiesFromFile(
                  IFormInterface $Form = null,
                  UploadedFile $File = null,
                  $IsMother = null
              ) {
          Severity: Major
          Found in Application/Transfer/Import/Schneeberg/Service.php - About 1 day to fix

            Method createContactsFromFile has 189 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public
                function createContactsFromFile(
                    IFormInterface $Form = null,
                    UploadedFile $File = null
                ) {
            Severity: Major
            Found in Application/Transfer/Import/Schneeberg/Service.php - About 7 hrs to fix

              Method createStaffsFromFile has 183 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createStaffsFromFile(IFormInterface $Form = null, UploadedFile $File = null)
                  {
              
                      /**
                       * Skip to Frontend
              Severity: Major
              Found in Application/Transfer/Import/Schneeberg/Service.php - About 7 hrs to fix

                Method createCompaniesFromFile has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createCompaniesFromFile(
                        IFormInterface $Form = null,
                        UploadedFile $File = null
                    ) {
                
                
                Severity: Major
                Found in Application/Transfer/Import/Schneeberg/Service.php - About 3 hrs to fix

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

                      private function getStudentsByName(
                          $firstName,
                          $lastName
                      ) {
                          $tblStudentAll = Group::useService()->getPersonAllByGroup(Group::useService()->getGroupByMetaTable('STUDENT'));
                  Severity: Minor
                  Found in Application/Transfer/Import/Schneeberg/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

                  Avoid deeply nested control flow statements.
                  Open

                                                          if ($subjectLanguage !== '') {
                                                              if ($subjectLanguage === 'EN'
                                                                  || $subjectLanguage === 'Englisch'
                                                              ) {
                                                                  $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                  Severity: Major
                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                            if (0 === strpos($phone, '01')) {
                                                                $tblType = Phone::useService()->getTypeById(2);
                                                            }
                    Severity: Major
                    Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                              if (!$tblPeriodList) {
                                                                  // firstTerm
                                                                  $tblPeriod = Term::useService()->insertPeriod(
                                                                      '1. Halbjahr',
                                                                      '01.08.20' . $year,
                      Severity: Major
                      Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                                if (0 === strpos($phone, '01')) {
                                                                    $tblType = Phone::useService()->getTypeById(2);
                                                                }
                        Severity: Major
                        Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                  if (!$tblPeriodList) {
                                                                      // firstTerm
                                                                      $tblPeriod = Term::useService()->insertPeriod(
                                                                          '1. Halbjahr',
                                                                          '01.08.20' . $year,
                          Severity: Major
                          Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                    if (0 === strpos($phoneNumber, '01')) {
                                                                        $tblType = Phone::useService()->getTypeById(2);
                                                                    }
                            Severity: Major
                            Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                          if (($tblCommon = Common::useService()->getCommonByPerson($tblRelationship->getServiceTblPersonFrom()))
                                                                              && ($tblCommonBirthDates = $tblCommon->getTblCommonBirthDates())
                                                                          ) {
                                                                              if ($tblCommonBirthDates->getGender() == TblCommonBirthDates::VALUE_GENDER_FEMALE) {
                                                                                  $tblMother = $tblRelationship->getServiceTblPersonFrom();
                              Severity: Major
                              Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                        if ($pos !== null) {
                                                                            $StreetName = trim(substr($Street, 0, $pos));
                                                                            $StreetNumber = trim(substr($Street, $pos));
                                                                        }
                                Severity: Major
                                Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                          if (0 === strpos($phoneNumber, '01')) {
                                                                              $tblType = Phone::useService()->getTypeById(2);
                                                                          }
                                  Severity: Major
                                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                            if (0 === strpos($phoneNumber, '01')) {
                                                                                $tblType = Phone::useService()->getTypeById(2);
                                                                            }
                                    Severity: Major
                                    Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                              if ($tblSubject) {
                                                                                  Student::useService()->addStudentSubject(
                                                                                      $tblStudent,
                                                                                      Student::useService()->getStudentSubjectTypeByIdentifier('RELIGION'),
                                                                                      Student::useService()->getStudentSubjectRankingByIdentifier('1'),
                                      Severity: Major
                                      Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                if ($tblCategory) {
                                                                                    $tblStudentAgreementTypeAll = Student::useService()->getStudentAgreementTypeAllByCategory($tblCategory);
                                                                                    if ($tblStudentAgreementTypeAll) {
                                                                                        foreach ($tblStudentAgreementTypeAll as $tblStudentAgreementType) {
                                                                                            Student::useService()->insertStudentAgreement($tblStudent,
                                        Severity: Major
                                        Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                                  if ($tblSchoolType) {
                                                                                      if ($division != '10') {
                                                                                          $pos = 1;
                                                                                          $level = substr($division, 0, $pos);
                                                                                          $division = substr($division, $pos);
                                          Severity: Major
                                          Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                                    if ($pos !== null) {
                                                                                        $streetName = trim(substr($street, 0, $pos));
                                                                                        $streetNumber = trim(substr($street, $pos));
                                                                                    }
                                            Severity: Major
                                            Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                                      if ($focus === 'HÖ') {
                                                                                          $tblStudentFocusType = Student::useService()->getStudentFocusTypeByName('Hören');
                                                                                          Student::useService()->addStudentFocus($tblStudent,
                                                                                              $tblStudentFocusType);
                                                                                      }
                                              Severity: Major
                                              Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                                        if ($subjectReligion === 'ETH') {
                                                                                            $tblSubject = Subject::useService()->getSubjectByAcronym('ETH');
                                                                                        } elseif ($subjectReligion === 'RE/e') {
                                                                                            $tblSubject = Subject::useService()->getSubjectByAcronym('REV');
                                                                                        }
                                                Severity: Major
                                                Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                                  if (preg_match_all('!\d+!', $street, $matches)) {
                                                                                      $pos = strpos($street, $matches[0][0]);
                                                                                      if ($pos !== null) {
                                                                                          $streetName = trim(substr($street, 0, $pos));
                                                                                          $streetNumber = trim(substr($street, $pos));
                                                  Severity: Major
                                                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                            if ($tblSchoolType) {
                                                                                                if (strlen($division) == 2) {
                                                                                                    $level = substr($division, 0, 1);
                                                                                                    $division = substr($division, 1, 1);
                                                                                                    $tblLevel = Division::useService()->insertLevel($tblSchoolType, $level);
                                                    Severity: Major
                                                    Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                      if ($streetName && $streetNumber && $zipCode && $city) {
                                                                                          Address::useService()->insertAddressToCompany(
                                                                                              $tblCompany,
                                                                                              $streetName,
                                                                                              $streetNumber,
                                                      Severity: Major
                                                      Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                                if ($pos !== null) {
                                                                                                    $streetName = trim(substr($street, 0, $pos));
                                                                                                    $streetNumber = trim(substr($street, $pos));
                                                                                                }
                                                        Severity: Major
                                                        Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                  return new Danger('File nicht gefunden');
                                                          Severity: Major
                                                          Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                    return new Danger('File nicht gefunden');
                                                            Severity: Major
                                                            Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                      return new Danger('File nicht gefunden');
                                                              Severity: Major
                                                              Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                        return new Danger('File nicht gefunden');
                                                                Severity: Major
                                                                Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                          return new Danger('File nicht gefunden');
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                            return new Danger('File nicht gefunden');
                                                                    Severity: Major
                                                                    Found in Application/Transfer/Import/Schneeberg/Service.php - About 30 mins to fix

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

                                                                          public function createCompaniesFromFile(
                                                                              IFormInterface $Form = null,
                                                                              UploadedFile $File = null
                                                                          ) {
                                                                      
                                                                      
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 4 other locations - About 4 days to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 58..178
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 55..175
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 58..178
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 58..178

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

                                                                      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

                                                                                      $Location = array(
                                                                                          'Schüler_Name' => null,
                                                                                          'Schüler_Vorname' => null,
                                                                                          'Schüler_Klasse' => null,
                                                                                          'Schüler_Geschlecht' => null,
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 2 days to fix
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 228..287

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

                                                                      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

                                                                                                          for ($i = 1; $i <= 2; $i++) {
                                                                                                              $subjectLanguage = trim($Document->getValue($Document->getCell($Location['Fächer_Fremdsprache' . $i],
                                                                                                                  $RunY)));
                                                                                                              $tblSubject = false;
                                                                                                              if ($subjectLanguage !== '') {
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 3 other locations - About 1 day to fix
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1693..1740
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1098..1145
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1039..1086

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

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

                                                                                                      if ($motherLastName != '') {
                                                                      
                                                                                                          $tblPersonMotherExists = Person::useService()->existsPerson(
                                                                                                              $motherFirstName,
                                                                                                              $motherLastName,
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 7 other locations - About 1 day to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 853..923
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 939..1009
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 661..731
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 747..817
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 1046..1116
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 539..609
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 625..695

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

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

                                                                                                      if ($fatherLastName != '') {
                                                                      
                                                                                                          $tblPersonFatherExists = Person::useService()->existsPerson(
                                                                                                              $fatherFirstName,
                                                                                                              $fatherLastName,
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 7 other locations - About 1 day to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 853..923
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 939..1009
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 661..731
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 747..817
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 1132..1202
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 539..609
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 625..695

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

                                                                      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 ($firstNameCustody1 !== '' && $lastNameCustody1 !== '') {
                                                                                                          $tblPersonCustody1Exists = Person::useService()->existsPerson(
                                                                                                              $firstNameCustody1,
                                                                                                              $lastNameCustody1,
                                                                                                              $cityCode
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 1 day to fix
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 322..387

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

                                                                      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 ($firstNameCustody2 !== '' && $lastNameCustody2 !== '') {
                                                                                                          $tblPersonCustody2Exists = Person::useService()->existsPerson(
                                                                                                              $firstNameCustody2,
                                                                                                              $lastNameCustody2,
                                                                                                              $cityCode
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 1 day to fix
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 248..313

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

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

                                                                                                      if ($tblPersonFather !== null) {
                                                                                                          $streetName = '';
                                                                                                          $streetNumber = '';
                                                                                                          $street = trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter2_Straße'],
                                                                                                              $RunY)));
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 7 other locations - About 1 day to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1012..1042
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1043..1073
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1318..1348
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1349..1379
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 1236..1266
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 697..727
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 728..758

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

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

                                                                                                      if ($tblPersonMother !== null) {
                                                                                                          $streetName = '';
                                                                                                          $streetNumber = '';
                                                                                                          $street = trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter1_Straße'],
                                                                                                              $RunY)));
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 7 other locations - About 1 day to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1012..1042
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1043..1073
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1318..1348
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1349..1379
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 1205..1235
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 697..727
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 728..758

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

                                                                      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 ($tblFather) {
                                                                                                          $number = trim($Document->getValue($Document->getCell($Location['Mobiltelefon Vater'],
                                                                                                              $RunY)));
                                                                                                          if ($number !== '') {
                                                                                                              Phone::useService()->insertPhoneToPerson(
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 7 hrs to fix
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 2394..2427

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

                                                                      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 ($tblMother) {
                                                                                                          $number = trim($Document->getValue($Document->getCell($Location['Mobiltelefon Mutter'],
                                                                                                              $RunY)));
                                                                                                          if ($number !== '') {
                                                                                                              Phone::useService()->insertPhoneToPerson(
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 7 hrs to fix
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 2429..2462

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

                                                                      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

                                                                                                      if ($sibling !== '') {
                                                                                                          if ($sibling == '0') {
                                                                                                              // do nothing
                                                                                                          } elseif ($sibling == '1') {
                                                                                                              $tblSiblingRank = Relationship::useService()->getSiblingRankById(1);
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 3 other locations - About 5 hrs to fix
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 937..955
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 832..850
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 887..905

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

                                                                      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

                                                                                      $Location = array(
                                                                                          'Schuljahr' => null,
                                                                                          'Klassenstufe' => null,
                                                                                          'Geschlecht' => null,
                                                                                          'Name' => null,
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 4 hrs to fix
                                                                      Application/Transfer/Import/Chemnitz/Service.php on lines 446..469

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                                          if (($course = trim($Document->getValue($Document->getCell($Location['Fächer_Bildungsgang'],
                                                                                                              $RunY))))
                                                                                                          ) {
                                                                                                              if ($course == 'HS') {
                                                                                                                  $tblCourse = Course::useService()->getCourseById(1); // Hauptschule
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 2 other locations - About 3 hrs to fix
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1048..1062
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1077..1091

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

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

                                                                                          return
                                                                                              new Success('Es wurden ' . $countInterestedPerson . ' Intessenten erfolgreich angelegt.') .
                                                                                              new Success('Es wurden ' . $countFather . ' Sorgeberechtigte1 erfolgreich angelegt.') .
                                                                                              ($countFatherExists > 0 ?
                                                                                                  new Warning($countFatherExists . ' Sorgeberechtigte1 exisistieren bereits.') : '') .
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 18 other locations - About 3 hrs to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1553..1567
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1759..1773
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 431..445
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 790..804
                                                                      Application/Transfer/Import/Coswig/Service.php on lines 644..658
                                                                      Application/Transfer/Import/Meerane/Service.php on lines 597..611
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1260..1274
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 653..667
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1170..1184
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 1615..1629
                                                                      Application/Transfer/Import/Schulstiftung/Service.php on lines 605..619
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 477..491
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 1337..1351
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 1776..1790
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 730..744
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 1135..1149
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1203..1217
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1574..1588

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

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

                                                                                          return
                                                                                              new Success('Es wurden ' . $countStudent . ' Schüler erfolgreich angelegt.') .
                                                                                              new Success('Es wurden ' . $countFather . ' Sorgeberechtigte2 erfolgreich angelegt.') .
                                                                                              ($countFatherExists > 0 ?
                                                                                                  new Warning($countFatherExists . ' Sorgeberechtigte2 exisistieren bereits.') : '') .
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 18 other locations - About 3 hrs to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 1553..1567
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1759..1773
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 431..445
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 790..804
                                                                      Application/Transfer/Import/Coswig/Service.php on lines 644..658
                                                                      Application/Transfer/Import/Meerane/Service.php on lines 597..611
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1260..1274
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 653..667
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1170..1184
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 470..484
                                                                      Application/Transfer/Import/Schulstiftung/Service.php on lines 605..619
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 477..491
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 1337..1351
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 1776..1790
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 730..744
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 1135..1149
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1203..1217
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1574..1588

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                      $Location = array(
                                                                                          'Klasse' => null,
                                                                                          'Name' => null,
                                                                                          'm / w' => null,
                                                                                          'Vorname' => null,
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 2 other locations - About 3 hrs to fix
                                                                      Application/Transfer/Import/FuxMedia/Service.php on lines 704..722
                                                                      Application/Transfer/Import/Herrnhut/Service.php on lines 1388..1406

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                                      if ($phoneNumber !== '') {
                                                                                                          $phoneNumberList = explode(';', $phoneNumber);
                                                                                                          foreach ($phoneNumberList as $phone) {
                                                                                                              $phone = trim($phone);
                                                                                                              $tblType = Phone::useService()->getTypeById(1);
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 4 other locations - About 2 hrs to fix
                                                                      Application/Transfer/Import/LebensweltZwenkau/Service.php on lines 605..620
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 416..431
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 1113..1128
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1550..1565

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                                      if ($phoneNumber !== '') {
                                                                                                          $phoneNumberList = explode(';', $phoneNumber);
                                                                                                          foreach ($phoneNumberList as $phone) {
                                                                                                              $phone = trim($phone);
                                                                                                              $tblType = Phone::useService()->getTypeById(1);
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 4 other locations - About 2 hrs to fix
                                                                      Application/Transfer/Import/LebensweltZwenkau/Service.php on lines 605..620
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 435..450
                                                                      Application/Transfer/Import/Tharandt/Service.php on lines 1113..1128
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1550..1565

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                                      Common::useService()->insertMeta(
                                                                                                          $tblPerson,
                                                                                                          $birthday,
                                                                                                          trim($Document->getValue($Document->getCell($Location['Schüler_Geburtsort'],
                                                                                                              $RunY))),
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 4 other locations - About 1 hr to fix
                                                                      Application/Transfer/Import/LebensweltZwenkau/Service.php on lines 300..310
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 357..370
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1987..2000
                                                                      Application/Transfer/Import/Seelitz/Service.php on lines 202..215

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

                                                                      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 ($subjectReligion !== '') {
                                                                                                              if ($subjectReligion === 'ETH') {
                                                                                                                  $tblSubject = Subject::useService()->getSubjectByAcronym('ETH');
                                                                                                              } elseif ($subjectReligion === 'RE/e') {
                                                                                                                  $tblSubject = Subject::useService()->getSubjectByAcronym('REV');
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 5 other locations - About 1 hr to fix
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 1676..1690
                                                                      Application/Transfer/Import/Herrnhut/Service.php on lines 973..987
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1081..1095
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1022..1036
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1110..1124

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

                                                                      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

                                                                                                      Prospect::useService()->insertMeta(
                                                                                                          $tblPerson,
                                                                                                          $reservationDate,
                                                                                                          '',
                                                                                                          '',
                                                                      Severity: Minor
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 1 other location - About 45 mins to fix
                                                                      Application/Transfer/Import/Zwickau/Service.php on lines 1402..1412

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

                                                                                          return
                                                                                              new Success('Es wurden ' . $countStaff . ' Mitarbeiter erfolgreich angelegt.') .
                                                                                              ($countStaffExists > 0 ?
                                                                                                  new Warning($countStaffExists . ' Mitarbeiter exisistieren bereits.') : '')
                                                                                              . new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 8 other locations - About 30 mins to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 412..422
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 316..326
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 978..988
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1719..1729
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 277..287
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 1398..1408
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1823..1833
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 2212..2222

                                                                      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

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

                                                                                          return
                                                                                              new Success('Es wurden ' . $countCustody . ' Sorgeberechtigte erfolgreich angelegt.')
                                                                                              . ($countCustodyExists > 0 ?
                                                                                                  new Warning($countCustodyExists . ' Sorgeberechtigte exisistieren bereits.') : '')
                                                                                              . new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(
                                                                      Severity: Major
                                                                      Found in Application/Transfer/Import/Schneeberg/Service.php and 8 other locations - About 30 mins to fix
                                                                      Application/Transfer/Import/Annaberg/Service.php on lines 412..422
                                                                      Application/Transfer/Import/BadDueben/Service.php on lines 316..326
                                                                      Application/Transfer/Import/Braeunsdorf/Service.php on lines 978..988
                                                                      Application/Transfer/Import/Muldental/Service.php on lines 1719..1729
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 277..287
                                                                      Application/Transfer/Import/Naundorf/Service.php on lines 1398..1408
                                                                      Application/Transfer/Import/Radebeul/Service.php on lines 1823..1833
                                                                      Application/Transfer/Import/Schneeberg/Service.php on lines 714..724

                                                                      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