DerDu/SPHERE-Framework

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

Summary

Maintainability
F
1 mo
Test Coverage

Function createPersonsFromFile has a Cognitive Complexity of 268 (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/Chemnitz/Service.php - About 5 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 createStudentsFromFile has a Cognitive Complexity of 171 (exceeds 5 allowed). Consider refactoring.
Open

    public function createStudentsFromFile(
        IFormInterface $Form = null,
        UploadedFile $File = null,
        $DivisionId = null
    ) {
Severity: Minor
Found in Application/Transfer/Import/Chemnitz/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 132 (exceeds 5 allowed). Consider refactoring.
Open

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

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

<?php
namespace SPHERE\Application\Transfer\Import\Chemnitz;

use MOC\V\Component\Document\Component\Bridge\Repository\PhpExcel;
use MOC\V\Component\Document\Document;
Severity: Major
Found in Application/Transfer/Import/Chemnitz/Service.php - About 2 days to fix

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

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

    Cognitive Complexity

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

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

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

    Further reading

    Method createPersonsFromFile has 322 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/Chemnitz/Service.php - About 1 day to fix

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

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

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

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

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

            Avoid deeply nested control flow statements.
            Open

                                            if ($FatherFirstName !== '') {
                                                $tblPersonFatherExists = $this->usePeoplePerson()->getPersonExists(
                                                    $FatherFirstName,
                                                    $LastName,
                                                    $CityCode
            Severity: Major
            Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($tblPersonFather !== null) {
                                                  $this->useContactAddress()->createAddressToPersonFromImport(
                                                      $tblPersonFather, $StreetName, $StreetNumber, $CityCode, $CityName
                                                  );
                                              }
              Severity: Major
              Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

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

                  Avoid deeply nested control flow statements.
                  Open

                                                  if ($tblPersonMother !== null) {
                                                      $this->useContactAddress()->createAddressToPersonFromImport(
                                                          $tblPersonMother, $StreetName, $StreetNumber, $CityCode, $CityName
                                                      );
                                                  }
                  Severity: Major
                  Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if ($MotherFirstName !== '') {
                                                        $tblPersonMotherExists = $this->usePeoplePerson()->getPersonExists(
                                                            $MotherFirstName,
                                                            $LastName,
                                                            $CityCode
                    Severity: Major
                    Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

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

                        Avoid deeply nested control flow statements.
                        Open

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

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (($OptionTypeB = trim($Document->getValue($Document->getCell($Location['Schulart 2'],
                                                                  $RunY)))) !== ''
                                                          ) {
                                                              if ($OptionTypeB == 'Oberschule') {
                                                                  $tblOptionTypeB = Type::useService()->getTypeById(8);
                          Severity: Major
                          Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

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

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ($pos !== null) {
                                                                      $StreetName = trim(substr($Street, 0, $pos));
                                                                      $StreetNumber = trim(substr($Street, $pos));
                                                                      ContactAddress\Address::useService()->insertAddressToCompany
                                                                      (
                              Severity: Major
                              Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

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

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if ($tblPerson !== false) {
                                                                      $countStudent++;
                                  
                                                                      $LastName = trim($Document->getValue($Document->getCell($Location['Name'], $RunY)));
                                                                      $City = trim($Document->getValue($Document->getCell($Location['PLZ Ort'], $RunY)));
                                  Severity: Major
                                  Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                    if (($OptionTypeA = trim($Document->getValue($Document->getCell($Location['Schulart 1'],
                                                                            $RunY)))) !== ''
                                                                    ) {
                                                                        if ($OptionTypeA == 'Oberschule') {
                                                                            $tblOptionTypeA = Type::useService()->getTypeById(8);
                                    Severity: Major
                                    Found in Application/Transfer/Import/Chemnitz/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/Chemnitz/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/Chemnitz/Service.php - About 30 mins to fix

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

                                                                          if ($MotherFirstName !== '') {
                                                                              $tblPersonMotherExists = $this->usePeoplePerson()->getPersonExists(
                                                                                  $MotherFirstName,
                                                                                  $LastName,
                                                                                  $CityCode
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 7 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 231..283

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

                                          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 ($MotherFirstName !== '') {
                                          
                                                                                  $tblPersonMotherExists = $this->usePeoplePerson()->getPersonExists(
                                                                                      $MotherFirstName,
                                                                                      $LastName,
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 7 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1060..1109

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

                                          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 ($FatherFirstName !== '') {
                                                                              $tblPersonFatherExists = $this->usePeoplePerson()->getPersonExists(
                                                                                  $FatherFirstName,
                                                                                  $LastName,
                                                                                  $CityCode
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 7 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 173..225

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

                                          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 ($FatherFirstName !== '') {
                                                                                  $tblPersonFatherExists = $this->usePeoplePerson()->getPersonExists(
                                                                                      $FatherFirstName,
                                                                                      $LastName,
                                                                                      $CityCode
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 7 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1004..1054

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

                                          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 (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/Chemnitz/Service.php and 1 other location - About 4 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1263..1274

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

                                          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 (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/Chemnitz/Service.php and 1 other location - About 4 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 563..574

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

                                          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(
                                                              'Anrede'          => null,
                                                              'Institution'     => null,
                                                              'Name'            => null,
                                                              'Vorname'         => null,
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 4 hrs to fix
                                          Application/Transfer/Import/Schneeberg/Service.php on lines 95..117

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 176.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          $tblPerson = $this->usePeoplePerson()->createPersonFromImport(
                                                                              \SPHERE\Application\People\Person\Person::useService()->getSalutationById(3),
                                                                              //Schüler
                                                                              '',
                                                                              trim($Document->getValue($Document->getCell($Location['Schüler'], $RunY))),
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 2 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 930..941

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

                                          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 = $this->usePeoplePerson()->createPersonFromImport(
                                                                          \SPHERE\Application\People\Person\Person::useService()->getSalutationById(3),
                                                                          //Schüler
                                                                          '',
                                                                          trim($Document->getValue($Document->getCell($Location['Schüler'], $RunY))),
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 2 hrs to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 136..147

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

                                          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

                                                                              $this->usePeopleMetaCommon()->createMetaFromImport(
                                                                                  $tblPerson,
                                                                                  date('Y-m-d', \PHPExcel_Shared_Date::ExcelToPHP(
                                                                                      trim($Document->getValue($Document->getCell($Location['Geburtsdatum'],
                                                                                          $RunY))))),
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 951..958

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

                                          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

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

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

                                          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 (($Number = trim($Document->getValue($Document->getCell($Location['Telefon_private'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              $tblType = \SPHERE\Application\Contact\Phone\Phone::useService()->getTypeById(1);
                                                                              if (0 === strpos($Number, '01')) {
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 3 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 594..607
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1279..1292
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1293..1306

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          if (($Number = trim($Document->getValue($Document->getCell($Location['Telefon 1'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              $tblType = \SPHERE\Application\Contact\Phone\Phone::useService()->getTypeById(1);
                                                                              if (0 === strpos($Number, '01')) {
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 3 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 579..592
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 594..607
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1293..1306

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          if (($Number = trim($Document->getValue($Document->getCell($Location['Telefon_dienst'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              $tblType = \SPHERE\Application\Contact\Phone\Phone::useService()->getTypeById(3);
                                                                              if (0 === strpos($Number, '01')) {
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 3 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 579..592
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1279..1292
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1293..1306

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          if (($Number = trim($Document->getValue($Document->getCell($Location['Telefon 2'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              $tblType = \SPHERE\Application\Contact\Phone\Phone::useService()->getTypeById(3);
                                                                              if (0 === strpos($Number, '01')) {
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 3 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 579..592
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 594..607
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 1279..1292

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          if (($OptionTypeB = trim($Document->getValue($Document->getCell($Location['Schulart 2'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              if ($OptionTypeB == 'Oberschule') {
                                                                                  $tblOptionTypeB = Type::useService()->getTypeById(8);
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 961..971

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                                          if (($OptionTypeA = trim($Document->getValue($Document->getCell($Location['Schulart 1'],
                                                                                  $RunY)))) !== ''
                                                                          ) {
                                                                              if ($OptionTypeA == 'Oberschule') {
                                                                                  $tblOptionTypeA = Type::useService()->getTypeById(8);
                                          Severity: Major
                                          Found in Application/Transfer/Import/Chemnitz/Service.php and 1 other location - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 973..983

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 115.

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

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

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

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

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 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/Chemnitz/Service.php and 4 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Chemnitz/Service.php on lines 337..344
                                          Application/Transfer/Import/Herrnhut/Service.php on lines 1122..1129
                                          Application/Transfer/Import/Hormersdorf/Service.php on lines 350..357
                                          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 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/Chemnitz/Service.php and 4 other locations - About 1 hr to fix
                                          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
                                          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/Chemnitz/Service.php and 2 other locations - About 1 hr to fix
                                          Application/Transfer/Import/Coswig/Service.php on lines 117..129
                                          Application/Transfer/Import/Hormersdorf/Service.php on lines 889..901

                                          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

                                          There are no issues that match your filters.

                                          Category
                                          Status