DerDu/SPHERE-Framework

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

Summary

Maintainability
F
3 wks
Test Coverage

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

    public function createStudentsFromFile(
        IFormInterface $Form = null,
        UploadedFile $File = null,
        $Data = null
    ) {
Severity: Minor
Found in Application/Transfer/Import/Hormersdorf/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 createInterestedPersonsFromFile has a Cognitive Complexity of 127 (exceeds 5 allowed). Consider refactoring.
Open

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

Severity: Minor
Found in Application/Transfer/Import/Hormersdorf/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

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

<?php

namespace SPHERE\Application\Transfer\Import\Hormersdorf;


Severity: Major
Found in Application/Transfer/Import/Hormersdorf/Service.php - About 2 days to fix

    Function createClubMembersFromFile has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createClubMembersFromFile(
            IFormInterface $Form = null,
            UploadedFile $File = null
        ) {
    
    
    Severity: Minor
    Found in Application/Transfer/Import/Hormersdorf/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 createDonorsFromFile has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
    Open

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

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

      Method createInterestedPersonsFromFile has 266 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/Hormersdorf/Service.php - About 1 day to fix

        Method createClubMembersFromFile has 177 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method createDonorsFromFile has 131 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Avoid deeply nested control flow statements.
            Open

                                            if ($pos !== false) {
                                                $firstName = trim(substr($fatherFullName, 0, $pos));
                                                $lastName = trim(substr($fatherFullName, $pos));
            
                                                $tblPersonFatherExists = Person::useService()->existsPerson(
            Severity: Major
            Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($tblPersonMother !== null) {
                                                  Address::useService()->insertAddressToPerson(
                                                      $tblPersonMother, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                      $cityDistrict, ''
                                                  );
              Severity: Major
              Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if ($pos !== false) {
                                                    $firstName = trim(substr($fatherFullName, 0, $pos));
                                                    $lastName = trim(substr($fatherFullName, $pos));
                
                                                    $tblPersonFatherExists = Person::useService()->existsPerson(
                Severity: Major
                Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if ($pos !== false) {
                                                      $firstName = trim(substr($motherFullName, 0, $pos));
                                                      $lastName = trim(substr($motherFullName, $pos));
                  
                                                      $tblPersonMotherExists = Person::useService()->existsPerson(
                  Severity: Major
                  Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

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

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ($pos !== false) {
                                                          $firstName = trim(substr($motherFullName, 0, $pos));
                                                          $lastName = trim(substr($motherFullName, $pos));
                      
                                                          $tblPersonMotherExists = Person::useService()->existsPerson(
                      Severity: Major
                      Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ($emailLocation) {
                                                            $mailAddress = trim($Document->getValue($Document->getCell($emailLocation,
                                                                $RunY)));
                                                            if ($mailAddress != '') {
                                                                Mail::useService()->insertMailToPerson(
                        Severity: Major
                        Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                              if ($pos !== false) {
                                                                  $cityDistrict = trim(substr($cityName, $pos));
                                                                  $cityName = trim(substr($cityName, 0, $pos));
                                                              }
                          Severity: Major
                          Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if ($mailAddress != '') {
                                                                Mail::useService()->insertMailToPerson(
                                                                    $tblPerson,
                                                                    $mailAddress,
                                                                    Mail::useService()->getTypeById(1),
                            Severity: Major
                            Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                              if ($pos !== false) {
                                                                  $cityDistrict = trim(substr($cityName, $pos));
                                                                  $cityName = trim(substr($cityName, 0, $pos));
                                                              }
                              Severity: Major
                              Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if ($pos !== false) {
                                                                        $cityDistrict = trim(substr($cityName, $pos));
                                                                        $cityName = trim(substr($cityName, 0, $pos));
                                                                    }
                                Severity: Major
                                Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if ($tblPersonFather !== null) {
                                                                      Address::useService()->insertAddressToPerson(
                                                                          $tblPersonFather, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                                          $cityDistrict, ''
                                                                      );
                                  Severity: Major
                                  Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                    if ($tblPersonMother !== null) {
                                                                        Address::useService()->insertAddressToPerson(
                                                                            $tblPersonMother, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                                            $cityDistrict, ''
                                                                        );
                                    Severity: Major
                                    Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                          if ($mailAddress != '') {
                                                                              Mail::useService()->insertMailToPerson(
                                                                                  $tblPerson,
                                                                                  $mailAddress,
                                                                                  Mail::useService()->getTypeById(1),
                                      Severity: Major
                                      Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                        if ($phoneLocation) {
                                                                            $phoneNumber = trim($Document->getValue($Document->getCell($phoneLocation,
                                                                                $RunY)));
                                                                            if ($phoneNumber != '') {
                                                                                $tblType = Phone::useService()->getTypeById(1);
                                        Severity: Major
                                        Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                          if ($pos !== false) {
                                                                              $cityDistrict = trim(substr($cityName, $pos));
                                                                              $cityName = trim(substr($cityName, 0, $pos));
                                                                          }
                                          Severity: Major
                                          Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

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

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                              if ($tblPersonFather !== null) {
                                                                                  Address::useService()->insertAddressToPerson(
                                                                                      $tblPersonFather, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                                                      $cityDistrict, ''
                                                                                  );
                                              Severity: Major
                                              Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                                if ($phoneNumber != '') {
                                                                                    $tblType = Phone::useService()->getTypeById(1);
                                                                                    if (0 === strpos($phoneNumber, '01')) {
                                                                                        $tblType = Phone::useService()->getTypeById(2);
                                                                                    }
                                                Severity: Major
                                                Found in Application/Transfer/Import/Hormersdorf/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/Hormersdorf/Service.php - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                    if ($tblDivision) {
                                                                                        Division::useService()->insertDivisionStudent($tblDivision, $tblPerson);
                                                                                    }
                                                    Severity: Major
                                                    Found in Application/Transfer/Import/Hormersdorf/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/Hormersdorf/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/Hormersdorf/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/Hormersdorf/Service.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                return new Warning(json_encode($Location)) . new Danger(
                                                                                    "File konnte nicht importiert werden, da nicht alle erforderlichen Spalten gefunden wurden");
                                                            Severity: Major
                                                            Found in Application/Transfer/Import/Hormersdorf/Service.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return
                                                                                      new Success('Es wurden ' . $countStudent . ' Schüler erfolgreich angelegt.') .
                                                                                      new Success('Es wurden ' . $countFather . ' Väter erfolgreich angelegt.') .
                                                                                      ($countFatherExists > 0 ?
                                                                                          new Warning($countFatherExists . ' Väter exisistieren bereits.') : '') .
                                                              Severity: Major
                                                              Found in Application/Transfer/Import/Hormersdorf/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/Hormersdorf/Service.php - About 30 mins to fix

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

                                                                                                  if ($pos !== false) {
                                                                                                      $firstName = trim(substr($fatherFullName, 0, $pos));
                                                                                                      $lastName = trim(substr($fatherFullName, $pos));
                                                                  
                                                                                                      $tblPersonFatherExists = Person::useService()->existsPerson(
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 3 other locations - About 1 day to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 244..300
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 977..1033
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 1040..1096

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

                                                                  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 ($pos !== false) {
                                                                                                      $firstName = trim(substr($motherFullName, 0, $pos));
                                                                                                      $lastName = trim(substr($motherFullName, $pos));
                                                                  
                                                                                                      $tblPersonMotherExists = Person::useService()->existsPerson(
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 3 other locations - About 1 day to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 181..237
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 977..1033
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 1040..1096

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

                                                                  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 ($pos !== false) {
                                                                                                      $firstName = trim(substr($fatherFullName, 0, $pos));
                                                                                                      $lastName = trim(substr($fatherFullName, $pos));
                                                                  
                                                                                                      $tblPersonFatherExists = Person::useService()->existsPerson(
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 3 other locations - About 1 day to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 181..237
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 244..300
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 1040..1096

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

                                                                  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 ($pos !== false) {
                                                                                                      $firstName = trim(substr($motherFullName, 0, $pos));
                                                                                                      $lastName = trim(substr($motherFullName, $pos));
                                                                  
                                                                                                      $tblPersonMotherExists = Person::useService()->existsPerson(
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 3 other locations - About 1 day to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 181..237
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 244..300
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 977..1033

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

                                                                  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 ($phoneLocation) {
                                                                                                      $phoneNumber = trim($Document->getValue($Document->getCell($phoneLocation,
                                                                                                          $RunY)));
                                                                                                      if ($phoneNumber != '') {
                                                                                                          $tblType = Phone::useService()->getTypeById(1);
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 2 other locations - About 1 hr to fix
                                                                  Application/Transfer/Import/Coswig/Service.php on lines 532..547
                                                                  Application/Transfer/Import/Coswig/Service.php on lines 549..564

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

                                                                                  $Location = array(
                                                                                      'Anrede' => null,
                                                                                      'Vorname' => null,
                                                                                      'Nachname' => null,
                                                                                      'PLZ' => null,
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 2 other locations - About 1 hr to fix
                                                                  Application/Transfer/Import/Braeunsdorf/Service.php on lines 853..867
                                                                  Application/Transfer/Import/Naundorf/Service.php on lines 727..741

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

                                                                  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

                                                                                                  Common::useService()->insertMeta(
                                                                                                      $tblPerson,
                                                                                                      date('Y-m-d', \PHPExcel_Shared_Date::ExcelToPHP(
                                                                                                          trim($Document->getValue($Document->getCell($Location['Geburtsdatum'],
                                                                                                              $RunY))))),
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 1 other location - About 1 hr to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 947..959

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

                                                                  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

                                                                                                  Common::useService()->insertMeta(
                                                                                                      $tblPerson,
                                                                                                      date('Y-m-d', \PHPExcel_Shared_Date::ExcelToPHP(
                                                                                                          trim($Document->getValue($Document->getCell($Location['Geburtsdatum'],
                                                                                                              $RunY))))),
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 1 other location - About 1 hr to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 145..157

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

                                                                  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

                                                                                      return
                                                                                          new Success('Es wurden ' . $countStudent . ' Schüler erfolgreich angelegt.') .
                                                                                          new Success('Es wurden ' . $countFather . ' Väter erfolgreich angelegt.') .
                                                                                          ($countFatherExists > 0 ?
                                                                                              new Warning($countFatherExists . ' Väter exisistieren bereits.') : '') .
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 4 other locations - About 1 hr to fix
                                                                  Application/Transfer/Import/Chemnitz/Service.php on lines 337..344
                                                                  Application/Transfer/Import/Chemnitz/Service.php on lines 1132..1139
                                                                  Application/Transfer/Import/Herrnhut/Service.php on lines 1122..1129
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 350..357

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

                                                                  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

                                                                                      return
                                                                                          new Success('Es wurden ' . $countInterestedPerson . ' Intessenten erfolgreich angelegt.') .
                                                                                          new Success('Es wurden ' . $countFather . ' Väter erfolgreich angelegt.') .
                                                                                          ($countFatherExists > 0 ?
                                                                                              new Warning($countFatherExists . ' Väter exisistieren bereits.') : '') .
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 4 other locations - About 1 hr to fix
                                                                  Application/Transfer/Import/Chemnitz/Service.php on lines 337..344
                                                                  Application/Transfer/Import/Chemnitz/Service.php on lines 1132..1139
                                                                  Application/Transfer/Import/Herrnhut/Service.php on lines 1122..1129
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 1151..1158

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

                                                                  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

                                                                                  for ($RunX = 0; $RunX < $X; $RunX++) {
                                                                                      $Value = trim($Document->getValue($Document->getCell($RunX, 0)));
                                                                                      if (array_key_exists($Value, $Location)) {
                                                                                          $Location[$Value] = $RunX;
                                                                                      }
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 2 other locations - About 1 hr to fix
                                                                  Application/Transfer/Import/Chemnitz/Service.php on lines 109..121
                                                                  Application/Transfer/Import/Coswig/Service.php on lines 117..129

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

                                                                  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(
                                                                                      'Vorname' => null,
                                                                                      'Nachname' => null,
                                                                                      'Geburtsdatum' => null,
                                                                                      'PLZ' => null,
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 1 other location - About 1 hr to fix
                                                                  Application/Transfer/Import/Naundorf/Service.php on lines 86..99

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

                                                                  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

                                                                                              $tblPerson = Person::useService()->insertPerson(
                                                                                                  Person::useService()->getSalutationById(3),    //Schüler
                                                                                                  '',
                                                                                                  $firstName,
                                                                                                  '',
                                                                  Severity: Minor
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 1 other location - About 55 mins to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 917..927

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 99.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                              $tblPerson = Person::useService()->insertPerson(
                                                                                                  Person::useService()->getSalutationById(3),    //Schüler
                                                                                                  '',
                                                                                                  $firstName,
                                                                                                  '',
                                                                  Severity: Minor
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 1 other location - About 55 mins to fix
                                                                  Application/Transfer/Import/Hormersdorf/Service.php on lines 115..125

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 99.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                  $Location = array(
                                                                                      'Nummer' => null,
                                                                                      'Vorname' => null,
                                                                                      'Name' => null,
                                                                                      'Geburtsdatum' => null,
                                                                  Severity: Major
                                                                  Found in Application/Transfer/Import/Hormersdorf/Service.php and 4 other locations - About 45 mins to fix
                                                                  Application/Transfer/Import/BadDueben/Service.php on lines 88..100
                                                                  Application/Transfer/Import/Braeunsdorf/Service.php on lines 1037..1049
                                                                  Application/Transfer/Import/Seelitz/Service.php on lines 544..556
                                                                  Application/Transfer/Import/Tharandt/Service.php on lines 1201..1213

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 96.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

                                                                  There are no issues that match your filters.

                                                                  Category
                                                                  Status