DerDu/SPHERE-Framework

View on GitHub

Showing 7,620 of 7,620 total issues

Function setContent has a Cognitive Complexity of 259 (exceeds 5 allowed). Consider refactoring.
Open

    private function setContent(
        TblDivision $tblDivision,
        TblSubject $tblSubject,
        TblSubjectGroup $tblSubjectGroup = null,
        TblPeriod $tblPeriod,
Severity: Minor
Found in Application/Api/Document/Standard/Repository/Gradebook/Gradebook.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 createPersonFromFile has a Cognitive Complexity of 259 (exceeds 5 allowed). Consider refactoring.
Open

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

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

    public static function validate(TblType $tblSchoolType, &$summary = array())
    {
        if (($tblSetting = Consumer::useService()->getSetting(
                'Reporting', 'KamenzReport', 'Validation', 'FirstForeignLanguageLevel'))
            && $tblSetting->getValue()
Severity: Minor
Found in Application/Reporting/KamenzReport/KamenzService.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 247 (exceeds 5 allowed). Consider refactoring.
Open

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

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

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

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

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

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

    File Frontend.php has 1836 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Created by PhpStorm.
     * User: Kauschke
     * Date: 21.09.2016
    Severity: Major
    Found in Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php - About 5 days to fix

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

      <?php
      namespace SPHERE\Application\Contact\Web\Service;
      
      use Doctrine\DBAL\Schema\Schema;
      use Doctrine\DBAL\Schema\Table;
      Severity: Major
      Found in Application/Contact/Web/Service/Setup.php and 2 other locations - About 4 days to fix
      Application/Contact/Mail/Service/Setup.php on lines 1..149
      Application/Contact/Phone/Service/Setup.php on lines 1..149

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

      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

      <?php
      namespace SPHERE\Application\Contact\Phone\Service;
      
      use Doctrine\DBAL\Schema\Schema;
      use Doctrine\DBAL\Schema\Table;
      Severity: Major
      Found in Application/Contact/Phone/Service/Setup.php and 2 other locations - About 4 days to fix
      Application/Contact/Mail/Service/Setup.php on lines 1..149
      Application/Contact/Web/Service/Setup.php on lines 1..149

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

      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

      <?php
      namespace SPHERE\Application\Contact\Mail\Service;
      
      use Doctrine\DBAL\Schema\Schema;
      use Doctrine\DBAL\Schema\Table;
      Severity: Major
      Found in Application/Contact/Mail/Service/Setup.php and 2 other locations - About 4 days to fix
      Application/Contact/Phone/Service/Setup.php on lines 1..149
      Application/Contact/Web/Service/Setup.php on lines 1..149

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

      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

          public function importUntisLectureship()
          {
      
              $InfoList = array();
              $tblUntisImportLectureshipList = $this->getUntisImportLectureshipAll(true);
      Severity: Major
      Found in Application/Transfer/Untis/Import/Service.php and 1 other location - About 4 days to fix
      Application/Transfer/Indiware/Import/Service.php on lines 482..622

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

      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

          public function importIndiwareLectureship()
          {
      
              $InfoList = array();
              $tblIndiwareImportLectureshipList = $this->getIndiwareImportLectureshipAll(true);
      Severity: Major
      Found in Application/Transfer/Indiware/Import/Service.php and 1 other location - About 4 days to fix
      Application/Transfer/Untis/Import/Service.php on lines 260..395

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

      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

      File GymAbitur.php has 1804 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Created by PhpStorm.
       * User: Kauschke
       * Date: 08.03.2018

        Method createStudentsFromFile has 971 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/Annaberg/Service.php - About 4 days to fix

          File ApiIndividual.php has 1783 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          namespace SPHERE\Application\Api\Reporting\Individual;
          
          use Doctrine\ORM\Query\Expr\Join;
          Severity: Major
          Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 4 days to fix

            Function createKindergartenFromFile has a Cognitive Complexity of 236 (exceeds 5 allowed). Consider refactoring.
            Open

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

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

            Cognitive Complexity

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

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

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

            Further reading

            Function tablePerson has a Cognitive Complexity of 228 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function tablePerson($DivisionSubjectId = null)
                {
            
                    // get Content
                    $tblDivisionSubject = DivisionApplication::useService()->getDivisionSubjectById($DivisionSubjectId);
            Severity: Minor
            Found in Application/Api/Education/Division/StudentGroupSelect.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 setStudentCardContent has a Cognitive Complexity of 228 (exceeds 5 allowed). Consider refactoring.
            Open

                public function setStudentCardContent(
                    $Data,
                    TblPerson $tblPerson,
                    AbstractDocument $documentClass,
                    TblType $tblType = null
            Severity: Minor
            Found in Application/Document/Generator/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

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

            <?php
            namespace SPHERE\Application\Education\Certificate\Generator\Repository;
            
            use SPHERE\System\Extension\Extension;
            
            
            Application/Document/Generator/Repository/Style.php on lines 1..317

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

            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

            Severity
            Category
            Status
            Source
            Language