DerDu/SPHERE-Framework

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

Summary

Maintainability
F
1 mo
Test Coverage

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

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

Severity: Minor
Found in Application/Transfer/Import/Tharandt/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 createInterestedFromFile has a Cognitive Complexity of 200 (exceeds 5 allowed). Consider refactoring.
Open

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

Severity: Minor
Found in Application/Transfer/Import/Tharandt/Service.php - About 4 days to fix

Cognitive Complexity

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

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

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

Further reading

Function createStaffFromFile has a Cognitive Complexity of 169 (exceeds 5 allowed). Consider refactoring.
Open

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

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Transfer/Import/Tharandt/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

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

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

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

    Method createStudentsFromFile has 582 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/Tharandt/Service.php - About 2 days to fix

      Method createInterestedFromFile has 326 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

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

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

          Consider simplifying this complex logical expression.
          Open

                              if (($division == 'a' && $level == '9' && $lastName == 'Buschmann')
                                  || ($division == 'b' && $level == '10' && $lastName == 'Henze')
                                  || ($division == '1' && $level == '11' && $lastName == 'Kost')
                              ) {
                                  //students get address by father
          Severity: Critical
          Found in Application/Transfer/Import/Tharandt/Service.php - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                                        if (($division == 'a' && $level == '9' && $lastName == 'Buschmann')
                                            || ($division == 'b' && $level == '10' && $lastName == 'Henze')
                                            || ($division == '1' && $level == '11' && $lastName == 'Kost')
                                        ) {
                                            Address::useService()->insertAddressToPerson(
            Severity: Critical
            Found in Application/Transfer/Import/Tharandt/Service.php - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

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

                Avoid deeply nested control flow statements.
                Open

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

                  Avoid deeply nested control flow statements.
                  Open

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

                    Avoid deeply nested control flow statements.
                    Open

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

                      Avoid deeply nested control flow statements.
                      Open

                                                  if ($tblPeriod) {
                                                      Term::useService()->insertYearPeriod($tblYear, $tblPeriod);
                                                  }
                      Severity: Major
                      Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if ($tblPeriod) {
                                                        Term::useService()->insertYearPeriod($tblYear, $tblPeriod);
                                                    }
                        Severity: Major
                        Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

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

                            Avoid too many return statements within this method.
                            Open

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

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

                                                if ($division !== '') {
                                                    $tblYear = Term::useService()->insertYear('20'.$year.'/'.($year + 1));
                                                    if ($tblYear) {
                                                        $tblPeriodList = Term::useService()->getPeriodAllByYear($tblYear);
                                                        if (!$tblPeriodList) {
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 2 days to fix
                                Application/Transfer/Import/Meerane/Service.php on lines 189..255

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                                                if ($firstNameCustody1 !== '' && $lastNameCustody1 !== '') {
                                                                    $tblPersonCustody1Exists = Person::useService()->existsPerson(
                                                                        $firstNameCustody1,
                                                                        $lastNameCustody1,
                                                                        $cityCode
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 1 day to fix
                                Application/Transfer/Import/Tharandt/Service.php on lines 1034..1098

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                                                if ($firstNameCustody2 !== '' && $lastNameCustody2 !== '') {
                                                                    $tblPersonCustody2Exists = Person::useService()->existsPerson(
                                                                        $firstNameCustody2,
                                                                        $lastNameCustody2,
                                                                        $cityCode
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 1 day to fix
                                Application/Transfer/Import/Tharandt/Service.php on lines 960..1025

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

                                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 (!$tblPersonFatherExists && $fatherLastName != '' && $fatherFirstName != '') {
                                
                                                    $tblGender = Common::useService()->getCommonGenderByName('Männlich');
                                                    if ($tblGender) {
                                                        $gender = $tblGender->getId();
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 1 day to fix
                                Application/Transfer/Import/Tharandt/Service.php on lines 347..404

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

                                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 (!$tblPersonMotherExists && $motherLastName != '' && $motherFirstName != '') {
                                                    $tblGender = Common::useService()->getCommonGenderByName('Weiblich');
                                                    if ($tblGender) {
                                                        $gender = $tblGender->getId();
                                                    } else {
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 1 day to fix
                                Application/Transfer/Import/Tharandt/Service.php on lines 444..502

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

                                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

                                                $Location = array(
                                                    'Termin'                => null,
                                                    'Name'                  => null,
                                                    'Kind'                  => null,
                                                    'Geb.- dat.'            => null,
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 3 other locations - About 3 hrs to fix
                                Application/Transfer/Import/Radebeul/Service.php on lines 1245..1265
                                Application/Transfer/Import/Radebeul/Service.php on lines 1609..1629
                                Application/Transfer/Import/Seelitz/Service.php on lines 1412..1432

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                                    return
                                                        new Success('Es wurden '.$countInterestedPerson.' Intessenten erfolgreich angelegt.').
                                                        new Success('Es wurden '.$countFather.' Sorgeberechtigte1 erfolgreich angelegt.').
                                                        ($countFatherExists > 0 ?
                                                            new Warning($countFatherExists.' Sorgeberechtigte1 exisistieren bereits.') : '').
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 18 other locations - About 3 hrs to fix
                                Application/Transfer/Import/Annaberg/Service.php on lines 1553..1567
                                Application/Transfer/Import/BadDueben/Service.php on lines 1759..1773
                                Application/Transfer/Import/Braeunsdorf/Service.php on lines 431..445
                                Application/Transfer/Import/Braeunsdorf/Service.php on lines 790..804
                                Application/Transfer/Import/Coswig/Service.php on lines 644..658
                                Application/Transfer/Import/Meerane/Service.php on lines 597..611
                                Application/Transfer/Import/Muldental/Service.php on lines 1260..1274
                                Application/Transfer/Import/Naundorf/Service.php on lines 653..667
                                Application/Transfer/Import/Radebeul/Service.php on lines 1170..1184
                                Application/Transfer/Import/Schneeberg/Service.php on lines 470..484
                                Application/Transfer/Import/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/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 '.$countMother.' Weibliche Sorgeberechtigte erfolgreich angelegt.').
                                                ($countMotherExists > 0 ?
                                                    new Warning($countMotherExists.' Weibliche Sorgeberechtigte exisistieren bereits.') : '').
                                Severity: Major
                                Found in Application/Transfer/Import/Tharandt/Service.php and 18 other locations - About 3 hrs to fix
                                Application/Transfer/Import/Annaberg/Service.php on lines 1553..1567
                                Application/Transfer/Import/BadDueben/Service.php on lines 1759..1773
                                Application/Transfer/Import/Braeunsdorf/Service.php on lines 431..445
                                Application/Transfer/Import/Braeunsdorf/Service.php on lines 790..804
                                Application/Transfer/Import/Coswig/Service.php on lines 644..658
                                Application/Transfer/Import/Meerane/Service.php on lines 597..611
                                Application/Transfer/Import/Muldental/Service.php on lines 1260..1274
                                Application/Transfer/Import/Naundorf/Service.php on lines 653..667
                                Application/Transfer/Import/Radebeul/Service.php on lines 1170..1184
                                Application/Transfer/Import/Schneeberg/Service.php on lines 470..484
                                Application/Transfer/Import/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 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 5 locations. Consider refactoring.
                                Open

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

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 121.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                                    return
                                                        new Success('Es wurden '.$countStaff.' Mitarbeiter erfolgreich angelegt.').
                                                        ($countStaffExists > 0 ?
                                                            new Warning($countStaffExists.' Mitarbeiter exisistieren bereits.') : '')
                                                        .(empty($error) ? '' : new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(
                                Severity: Minor
                                Found in Application/Transfer/Import/Tharandt/Service.php and 1 other location - About 55 mins to fix
                                Application/Transfer/Import/Seelitz/Service.php on lines 704..714

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 99.

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

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

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

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

                                Refactorings

                                Further Reading

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

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

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 96.

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

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

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

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

                                Refactorings

                                Further Reading

                                There are no issues that match your filters.

                                Category
                                Status