DerDu/SPHERE-Framework

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

Summary

Maintainability
F
3 wks
Test Coverage

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

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

Severity: Minor
Found in Application/Transfer/Import/Braeunsdorf/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 126 (exceeds 5 allowed). Consider refactoring.
Open

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

Severity: Minor
Found in Application/Transfer/Import/Braeunsdorf/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
/**
 * Created by PhpStorm.
 * User: Kauschke
 * Date: 07.06.2019
Severity: Major
Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 2 days to fix

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

        public function createCompaniesFromFile(IFormInterface $Form = null, UploadedFile $File = null)
        {
    
            /**
             * Skip to Frontend
    Severity: Minor
    Found in Application/Transfer/Import/Braeunsdorf/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 330 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/Braeunsdorf/Service.php - About 1 day to fix

      Function createPersonsFromFile has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createPersonsFromFile(IFormInterface $Form = null, UploadedFile $File = null)
          {
      
              /**
               * Skip to Frontend
      Severity: Minor
      Found in Application/Transfer/Import/Braeunsdorf/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 createInterestedPersonsFromFile has 284 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/Braeunsdorf/Service.php - About 1 day to fix

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

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

          Method createPersonsFromFile has 135 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Avoid deeply nested control flow statements.
            Open

                                            if (($Number = trim($Document->getValue($Document->getCell($Location['Telefon dienstlich'],
                                                    $RunY)))) != ''
                                            ) {
                                                $tblType = Phone::useService()->getTypeById(3);
                                                if (0 === strpos($Number, '01')) {
            Severity: Major
            Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if (!$tblPerson->fetchMainAddress()) {
                                                  Address::useService()->insertAddressToPerson(
                                                      $tblPerson,
                                                      $streetName,
                                                      $streetNumber,
              Severity: Major
              Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if (($MailAddress = trim($Document->getValue($Document->getCell($Location['E-Mail Firma'],
                                                        $RunY)))) != ''
                                                ) {
                                                    $tblType = Mail::useService()->getTypeById(2);
                                                    Mail::useService()->insertMailToCompany
                Severity: Major
                Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if ($tblPerson) {
                                                      Relationship::useService()->addCompanyRelationshipToPerson(
                                                          $tblCompany,
                                                          $tblPerson,
                                                          $tblTypeCommon
                  Severity: Major
                  Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if ($remark != '') {
                                                        if (($tblCommon = $tblPerson->getCommon())) {
                                                            Common::useService()->updateCommon($tblCommon, $tblCommon->getRemark() . "\n" . $remark);
                                                        } else {
                                                            Common::useService()->insertMeta(
                    Severity: Major
                    Found in Application/Transfer/Import/Braeunsdorf/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/Braeunsdorf/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/Braeunsdorf/Service.php - About 30 mins to fix

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

                                                          if ($motherLastName != '') {
                                                              $tblPersonMotherExists = Person::useService()->existsPerson(
                                                                  $motherFirstName,
                                                                  $motherLastName,
                                                                  $studentCityCode
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 day to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 355..424

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

                          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 ($fatherLastName != '') {
                                                              $tblPersonFatherExists = Person::useService()->existsPerson(
                                                                  $fatherFirstName,
                                                                  $fatherLastName,
                                                                  $studentCityCode
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 day to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 278..347

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

                          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 ($fatherLastName != '') {
                                                              $tblPersonFatherExists = Person::useService()->existsPerson(
                                                                  $fatherFirstName,
                                                                  $fatherLastName,
                                                                  $studentCityCode
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 day to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 647..712

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

                          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 ($motherLastName != '') {
                                                              $tblPersonMotherExists = Person::useService()->existsPerson(
                                                                  $motherFirstName,
                                                                  $motherLastName,
                                                                  $studentCityCode
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 day to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 720..785

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

                          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(
                                              'Klasse' => null,
                                              'Nachname' => null,
                                              'Vorname' => null,
                                              'Geburtsdatum' => null,
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 7 hrs to fix
                          Application/Transfer/Import/Radebeul/Service.php on lines 1894..1923

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 232.

                          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 . ' Interessenten 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/Braeunsdorf/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/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/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 . ' Väter erfolgreich angelegt.') .
                                                  ($countFatherExists > 0 ?
                                                      new Warning($countFatherExists . ' Väter exisistieren bereits.') : '') .
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/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 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/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 2 locations. Consider refactoring.
                          Open

                                          $Location = array(
                                              'Bemerkung' => null,
                                              'Nachname' => null,
                                              'Vorname' => null,
                                              'Geburtsdatum' => null,
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 3 hrs to fix
                          Application/Transfer/Import/Meerane/Service.php on lines 89..108

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                          if ($tblPersonExits) {
                                                              $error[] = 'Zeile: ' . ($RunY + 1)
                                                                  . ' (' . $lastName . ', ' . $firstName . ') '
                                                                  . ' Der Ansprechpartner wurde nicht angelegt, da schon eine Person mit gleichen Namen existiert.';
                          
                          
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 3 hrs to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 908..934

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                      if ($tblPersonExits) {
                          
                                                          $error[] = 'Zeile: ' . ($RunY + 1)
                                                              . ' (' . $lastName . ', ' . $firstName . ') '
                                                              . ' Die Person wurde nicht angelegt, da schon eine Person mit gleichen Namen und gleicher PLZ existiert.';
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 3 hrs to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 1137..1161

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

                          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 (($schoolContractBegin = trim($Document->getValue($Document->getCell($Location['Schulvertrag Beginn'], $RunY)))) != '') {
                                                              try {
                                                                  $beginDate = date('d.m.Y', \PHPExcel_Shared_Date::ExcelToPHP($schoolContractBegin));
                                                              } catch (\Exception $ex) {
                                                                  $beginDate = '';
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 2 hrs to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 209..217

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 123.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                          if (($schoolContractEnd = trim($Document->getValue($Document->getCell($Location['Schulvertrag Ende'], $RunY)))) != '') {
                                                              try {
                                                                  $endDate = date('d.m.Y', \PHPExcel_Shared_Date::ExcelToPHP($schoolContractEnd));
                                                              } catch (\Exception $ex) {
                                                                  $endDate = '';
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 2 hrs to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 200..208

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 123.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                                          Common::useService()->insertMeta(
                                                              $tblPerson,
                                                              $birthday,
                                                              trim($Document->getValue($Document->getCell($Location['Geburtsort'], $RunY))),
                                                              '',
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 hr to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 219..229

                          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

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

                                                          Common::useService()->insertMeta(
                                                              $tblPerson,
                                                              $birthday,
                                                              trim($Document->getValue($Document->getCell($Location['Geburtsort'], $RunY))),
                                                              '',
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 hr to fix
                          Application/Transfer/Import/Braeunsdorf/Service.php on lines 596..606

                          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(
                                              'Gruppe' => null,
                                              'Anrede' => null,
                                              'Nachname' => null,
                                              'Vorname' => null,
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 2 other locations - About 1 hr to fix
                          Application/Transfer/Import/Hormersdorf/Service.php on lines 418..432
                          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

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

                                                          if ($level !== '' && $tblYear && $tblSchoolType) {
                                                              $tblLevel = Division::useService()->insertLevel($tblSchoolType, $level);
                                                              if ($tblLevel) {
                                                                  $tblDivision = Division::useService()->insertDivision(
                                                                      $tblYear,
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 1 other location - About 1 hr to fix
                          Application/Transfer/Import/Naundorf/Service.php on lines 843..858

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 110.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                          $Location = array(
                                              'Anrede' => null,
                                              'Nachname' => null,
                                              'Vorname' => null,
                                              'Firmenbezeichnung' => null,
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/Service.php and 4 other locations - About 45 mins to fix
                          Application/Transfer/Import/BadDueben/Service.php on lines 88..100
                          Application/Transfer/Import/Hormersdorf/Service.php on lines 872..884
                          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

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

                                              return
                                                  new Success('Es wurden ' . $countClub . ' Vereinsmitglieder erfolgreich angelegt.') .
                                                  ($countClubExists > 0 ?
                                                      new Warning($countClubExists . ' Vereinsmitglieder exisistieren bereits.') : '')
                                                  . new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(
                          Severity: Major
                          Found in Application/Transfer/Import/Braeunsdorf/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/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
                          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

                          There are no issues that match your filters.

                          Category
                          Status