DerDu/SPHERE-Framework

View on GitHub

Showing 7,620 of 7,620 total issues

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

    public function frontendSignList($DivisionId = null)
    {
        $Stage = new Stage('EZSH Auswertung', 'Unterschriften Liste');
        if (null !== $DivisionId) {
            $Stage->addButton(new Standard('Zurück', '/Reporting/Custom/Herrnhut/Person/SignList', new ChevronLeft()));
Severity: Major
Found in Application/Reporting/Custom/Herrnhut/Person/Frontend.php and 2 other locations - About 6 days to fix
Application/Reporting/Custom/Chemnitz/Person/Frontend.php on lines 677..839
Application/Reporting/Custom/Herrnhut/Person/Frontend.php on lines 55..212

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

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

    public function frontendProfileList($DivisionId = null)
    {
        $Stage = new Stage('EZSH Auswertung', 'Klassenliste Profile');
        if (null !== $DivisionId) {
            $Stage->addButton(new Standard('Zurück', '/Reporting/Custom/Herrnhut/Person/ProfileList', new ChevronLeft()));
Severity: Major
Found in Application/Reporting/Custom/Herrnhut/Person/Frontend.php and 2 other locations - About 6 days to fix
Application/Reporting/Custom/Chemnitz/Person/Frontend.php on lines 677..839
Application/Reporting/Custom/Herrnhut/Person/Frontend.php on lines 219..376

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

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

    public function frontendParentTeacherConferenceList($DivisionId = null)
    {

        $Stage = new Stage('ESZC Auswertung', 'Liste für Elternabende');
        if (null !== $DivisionId) {
Severity: Major
Found in Application/Reporting/Custom/Chemnitz/Person/Frontend.php and 2 other locations - About 6 days to fix
Application/Reporting/Custom/Herrnhut/Person/Frontend.php on lines 55..212
Application/Reporting/Custom/Herrnhut/Person/Frontend.php on lines 219..376

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

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

Function frontendListObjectSelect has a Cognitive Complexity of 313 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendListObjectSelect(
        $ListId = null,
        $ObjectTypeId = null,
        $ObjectTypeSelect = null
    ) {
Severity: Minor
Found in Application/Reporting/CheckList/Frontend.php - About 6 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 calcStudentGrade has a Cognitive Complexity of 288 (exceeds 5 allowed). Consider refactoring.
Open

    public function calcStudentGrade(
        TblPerson $tblPerson,
        TblDivision $tblDivision,
        TblSubject $tblSubject,
        TblTestType $tblTestType,
Severity: Minor
Found in Application/Education/Graduation/Gradebook/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 getGradebookOverviewSlice has a Cognitive Complexity of 286 (exceeds 5 allowed). Consider refactoring.
Open

    public function getGradebookOverviewSlice()
    {

        if ($this->getTblDivision()
            && ($tblPerson = $this->getTblPerson())

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 2123 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function filterObjectList has a Cognitive Complexity of 284 (exceeds 5 allowed). Consider refactoring.
    Open

        public function filterObjectList($objectList, $filterYear, $filterLevel, $filterSchoolOption1, $filterSchoolOption2)
        {
    
            $resultList = array();
    
    
    Severity: Minor
    Found in Application/Reporting/CheckList/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 Frontend.php has 2079 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    namespace SPHERE\Application\Education\Lesson\Division;
    
    use SPHERE\Application\Api\Education\Division\StudentGroupSelect;
    use SPHERE\Application\Api\Education\Division\StudentSelect;
    Severity: Major
    Found in Application/Education/Lesson/Division/Frontend.php - About 5 days to fix

      Function getStudentFilterResult has a Cognitive Complexity of 278 (exceeds 5 allowed). Consider refactoring.
      Open

          private function getStudentFilterResult($Year = null, $Division = null, AbstractField $Field)
          {
              /** @var SelectBox|TextField $Field */
              $Label = $Field->getLabel();
      
      
      Severity: Minor
      Found in Application/Api/MassReplace/StudentFilter.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 frontendPrepareShowSubjectGrades has a Cognitive Complexity of 278 (exceeds 5 allowed). Consider refactoring.
      Open

          public function frontendPrepareShowSubjectGrades($PrepareId = null, $GroupId = null, $Route = null)
          {
      
              $Stage = new Stage('Zeugnisvorbereitung', 'Fachnoten-Übersicht');
      
      
      Severity: Minor
      Found in Application/Education/Certificate/Prepare/Frontend.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 updateSerialLetter has a Cognitive Complexity of 274 (exceeds 5 allowed). Consider refactoring.
      Open

          public function updateSerialLetter(
              IFormInterface $Stage = null,
              TblSerialLetter $tblSerialLetter,
              $SerialLetter = null,
              $FilterGroup = null,
      Severity: Minor
      Found in Application/Reporting/SerialLetter/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 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

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

          public static function getContent()
          {
              $sliceList = array();
      
              $sliceList[] = (new Slice())
      Application/Api/Document/Standard/Repository/KamenzReportGS/F01.php on lines 25..194

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

      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 static function getContent()
          {
              $sliceList = array();
      
              $sliceList[] = (new Slice())
      Application/Api/Document/Standard/Repository/KamenzReportGym/F01.php on lines 17..204

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

      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

      Function frontendTransferOltIntegration has a Cognitive Complexity of 271 (exceeds 5 allowed). Consider refactoring.
      Open

          public function frontendTransferOltIntegration()
          {
      
              $Stage = new Stage('Integartion', 'Übernehmen');
              $Stage->addButton(new Standard('Zurück', __NAMESPACE__, new ChevronLeft()));
      Severity: Minor
      Found in Application/Platform/System/DataMaintenance/DataMaintenance.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 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

      File KamenzReportService.php has 1998 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace SPHERE\Application\Document\Generator\Service\Kamenz;
      
      use SPHERE\Application\Corporation\Group\Group;
      Severity: Major
      Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 5 days to fix

        Function frontendFillAccidentReport has a Cognitive Complexity of 265 (exceeds 5 allowed). Consider refactoring.
        Open

            public function frontendFillAccidentReport($Id = null)
            {
        
                $Stage = new Stage('Unfallanzeige', 'Erstellen');
                $Stage->addButton(new Standard('Zurück', '/Document/Standard/AccidentReport', new ChevronLeft()));
        Severity: Minor
        Found in Application/Document/Standard/AccidentReport/AccidentReport.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 createClubMembersFromFile has a Cognitive Complexity of 261 (exceeds 5 allowed). Consider refactoring.
        Open

            public function createClubMembersFromFile(
                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

        Severity
        Category
        Status
        Source
        Language