DerDu/SPHERE-Framework

View on GitHub
Application/Education/Graduation/Evaluation/Frontend.php

Summary

Maintainability
F
2 mos
Test Coverage

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

<?php
namespace SPHERE\Application\Education\Graduation\Evaluation;

use DateTime;
use SPHERE\Application\Api\Education\Graduation\Evaluation\ApiEvaluation;
Severity: Major
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk to fix

    Function contentEditTestGrade has a Cognitive Complexity of 369 (exceeds 5 allowed). Consider refactoring.
    Open

        private function contentEditTestGrade(Stage $Stage, TblTest $tblTest, $Grade, $BasicRoute, $IsEdit = false)
        {
    
            if (!$tblTest->getServiceTblDivision()) {
                return new Danger(new Ban() . ' Klasse nicht gefunden')
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk 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 setGradeOverviewForTask has a Cognitive Complexity of 350 (exceeds 5 allowed). Consider refactoring.
    Open

        private function setGradeOverviewForTask(
            TblTask $tblTask,
            $divisionList,
            $tableHeaderList,
            $studentList,
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk 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 contentTestSelected has a Cognitive Complexity of 169 (exceeds 5 allowed). Consider refactoring.
    Open

        private function contentTestSelected($DivisionSubjectId, $Test, Stage $Stage, $BasicRoute)
        {
    
            $Stage->addButton(new Standard('Zurück', $BasicRoute, new ChevronLeft()));
    
    
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Frontend.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

    Method contentEditTestGrade has 615 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function contentEditTestGrade(Stage $Stage, TblTest $tblTest, $Grade, $BasicRoute, $IsEdit = false)
        {
    
            if (!$tblTest->getServiceTblDivision()) {
                return new Danger(new Ban() . ' Klasse nicht gefunden')
    Severity: Major
    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 days to fix

      Function frontendEditProposalTestGrade has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
      Open

          public function frontendEditProposalTestGrade($DivisionId = null, $TaskId = null, $GradeTypeId = null, $Grade = null)
          {
              $stage = new Stage('Kopfnotenvorschlag des Klassenlehrers', 'Zensuren eintragen');
      
              if (!($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
      Severity: Minor
      Found in Application/Education/Graduation/Evaluation/Frontend.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

      Function frontendTestTeacher has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring.
      Open

          public function frontendTestTeacher($IsAllYears = false, $YearId = null)
          {
      
              $Stage = new Stage('Leistungsüberprüfung', 'Auswahl');
              $Stage->setMessage(
      Severity: Minor
      Found in Application/Education/Graduation/Evaluation/Frontend.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

      Function frontendHeadmasterTaskDivision has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring.
      Open

          public function frontendHeadmasterTaskDivision($Id = null, $Data = null)
          {
      
              $Stage = new Stage('Notenauftrag', 'Klassen zuordnen');
              $Stage->setMessage(new Bold(new Exclamation() . ' Hinweis: ') . 'Bei der Auswahl vieler Klassen kann das Speichern einige Zeit dauern.');
      Severity: Minor
      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

      Cognitive Complexity

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

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

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

      Further reading

      Method contentTestSelected has 370 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function contentTestSelected($DivisionSubjectId, $Test, Stage $Stage, $BasicRoute)
          {
      
              $Stage->addButton(new Standard('Zurück', $BasicRoute, new ChevronLeft()));
      
      
      Severity: Major
      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

        Method frontendEditProposalTestGrade has 301 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function frontendEditProposalTestGrade($DivisionId = null, $TaskId = null, $GradeTypeId = null, $Grade = null)
            {
                $stage = new Stage('Kopfnotenvorschlag des Klassenlehrers', 'Zensuren eintragen');
        
                if (!($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
        Severity: Major
        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

          Function frontendHeadmasterTest has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
          Open

              public function frontendHeadmasterTest($IsAllYears = false, $YearId = null)
              {
          
                  $Stage = new Stage('Leistungsüberprüfung', 'Auswahl');
                  $Stage->setMessage(
          Severity: Minor
          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function countGradesAndStudentsByTest has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
          Open

              private function countGradesAndStudentsByTest(TblTest $tblTest, &$countGrades, &$countStudents)
              {
                  $tblDivision = $tblTest->getServiceTblDivision();
                  $tblSubject = $tblTest->getServiceTblSubject();
                  $tblSubjectGroup = $tblTest->getServiceTblSubjectGroup();
          Severity: Minor
          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method setGradeOverviewForTask has 216 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function setGradeOverviewForTask(
                  TblTask $tblTask,
                  $divisionList,
                  $tableHeaderList,
                  $studentList,
          Severity: Major
          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

            Function setContentForBehaviorTask has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
            Open

                private function setContentForBehaviorTask(
                    TblTest $tblTest,
                    TblTask $tblTask = null,
                    TblDivision $tblDivision,
                    TblSubject $tblSubject,
            Severity: Minor
            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

            Cognitive Complexity

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

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

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

            Further reading

            Method frontendTestTeacher has 201 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendTestTeacher($IsAllYears = false, $YearId = null)
                {
            
                    $Stage = new Stage('Leistungsüberprüfung', 'Auswahl');
                    $Stage->setMessage(
            Severity: Major
            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

              Function setGradeMirror has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function setGradeMirror(TblScoreType $tblScoreType = null, $gradeList, $Grade)
                  {
                      $minRange = null;
                      $maxRange = null;
                      if ($tblScoreType) {
              Severity: Minor
              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 7 hrs 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 frontendHeadmasterTaskDivision has 182 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendHeadmasterTaskDivision($Id = null, $Data = null)
                  {
              
                      $Stage = new Stage('Notenauftrag', 'Klassen zuordnen');
                      $Stage->setMessage(new Bold(new Exclamation() . ' Hinweis: ') . 'Bei der Auswahl vieler Klassen kann das Speichern einige Zeit dauern.');
              Severity: Major
              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 7 hrs to fix

                Function frontendDivisionTeacherTaskGrades has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function frontendDivisionTeacherTaskGrades($Id = null, $DivisionId = null)
                    {
                
                        $Stage = new Stage('Notenauftrag', 'Zensurenübersicht');
                
                
                Severity: Minor
                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 7 hrs 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 frontendDivisionTeacherTask has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function frontendDivisionTeacherTask($IsAllYears = false, $YearId = null)
                    {
                
                        $Stage = new Stage('Notenaufträge', 'Übersicht');
                        $Stage->setMessage(
                Severity: Minor
                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 6 hrs 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 contentEditTest has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function contentEditTest(Stage $Stage, $Id, $Test, $BasicRoute)
                    {
                
                        $tblTest = Evaluation::useService()->getTestById($Id);
                        if ($tblTest) {
                Severity: Major
                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 6 hrs to fix

                  Method frontendHeadmasterTest has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendHeadmasterTest($IsAllYears = false, $YearId = null)
                      {
                  
                          $Stage = new Stage('Leistungsüberprüfung', 'Auswahl');
                          $Stage->setMessage(
                  Severity: Major
                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 6 hrs to fix

                    Frontend has 41 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Frontend extends Extension implements IFrontendInterface
                    {
                    
                        /**
                         * @return Stage
                    Severity: Minor
                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 5 hrs to fix

                      Function setStudentList has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function setStudentList(
                              TblDivisionSubject $tblDivisionSubject,
                              TblTest $tblTest,
                              $studentList,
                              &$studentTestList,
                      Severity: Minor
                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs 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 contentEditTest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function contentEditTest(Stage $Stage, $Id, $Test, $BasicRoute)
                          {
                      
                              $tblTest = Evaluation::useService()->getTestById($Id);
                              if ($tblTest) {
                      Severity: Minor
                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs 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 frontendDivisionTeacherTaskGrades has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendDivisionTeacherTaskGrades($Id = null, $DivisionId = null)
                          {
                      
                              $Stage = new Stage('Notenauftrag', 'Zensurenübersicht');
                      
                      
                      Severity: Major
                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs to fix

                        Method frontendDivisionTeacherTask has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendDivisionTeacherTask($IsAllYears = false, $YearId = null)
                            {
                        
                                $Stage = new Stage('Notenaufträge', 'Übersicht');
                                $Stage->setMessage(
                        Severity: Major
                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs to fix

                          Method frontendHeadmasterTask has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function frontendHeadmasterTask($Task = null, $IsAllYears = false, $YearId = null)
                              {
                          
                                  $Stage = new Stage('Notenaufträge', 'Übersicht');
                                  $Stage->setMessage(
                          Severity: Major
                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs to fix

                            Function setTableContentForAppointedDateTask has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private function setTableContentForAppointedDateTask(
                                    TblDivision $tblDivision,
                                    TblTest $tblTest,
                                    TblSubject $tblSubject,
                                    TblPerson $tblPerson,
                            Severity: Minor
                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 hrs 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 frontendProposalTestSelected has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function frontendProposalTestSelected($DivisionId = null)
                                {
                                    $stage = new Stage('Kopfnotenvorschlag des Klassenlehrers', 'Übersicht');
                            
                                    if (($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
                            Severity: Minor
                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs 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 frontendHeadmasterTaskGrades has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function frontendHeadmasterTaskGrades($Id = null, $DivisionId = null)
                                {
                                    $Stage = new Stage('Notenauftrag', 'Zensurenübersicht');
                            
                                    $tblTask = false;
                            Severity: Major
                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs to fix

                              Function contentDestroyTest has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function contentDestroyTest(Stage $Stage, $Id, $Confirm, $BasicRoute)
                                  {
                              
                                      $tblTest = Evaluation::useService()->getTestById($Id);
                                      if ($tblTest) {
                              Severity: Minor
                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs 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 setContentForBehaviorTask has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function setContentForBehaviorTask(
                                      TblTest $tblTest,
                                      TblTask $tblTask = null,
                                      TblDivision $tblDivision,
                                      TblSubject $tblSubject,
                              Severity: Major
                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs to fix

                                Function frontendHeadmasterTaskGrades has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function frontendHeadmasterTaskGrades($Id = null, $DivisionId = null)
                                    {
                                        $Stage = new Stage('Notenauftrag', 'Zensurenübersicht');
                                
                                        $tblTask = false;
                                Severity: Minor
                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs 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

                                Consider simplifying this complex logical expression.
                                Open

                                                                            if (!$tblTestTemp->isContinues()    // Testdatum
                                                                                || ($tblTestTemp->isContinues()   // Notendatum
                                                                                    && $tblGrade->getDate() && $tblTask->getDate()
                                                                                    && ($taskDate = new \DateTime($tblTask->getDate()))
                                                                                    && ($gradeDate = new \DateTime($tblGrade->getDate()))
                                Severity: Critical
                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs to fix

                                  Method contentDestroyTest has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function contentDestroyTest(Stage $Stage, $Id, $Confirm, $BasicRoute)
                                      {
                                  
                                          $tblTest = Evaluation::useService()->getTestById($Id);
                                          if ($tblTest) {
                                  Severity: Major
                                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 hrs to fix

                                    Function setTableContentForBehaviourTask has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private function setTableContentForBehaviourTask(
                                            TblDivision $tblDivision,
                                            TblTest $tblTest,
                                            TblPerson $tblPerson,
                                            $studentList,
                                    Severity: Minor
                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs 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 formTest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function formTest(
                                            TblDivision $tblDivision,
                                            TblYear $tblYear,
                                            TblScoreRule $tblScoreRule = null,
                                            TblDivisionSubject $tblDivisionSubjectSelected = null
                                    Severity: Major
                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                      Method countGradesAndStudentsByTest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function countGradesAndStudentsByTest(TblTest $tblTest, &$countGrades, &$countStudents)
                                          {
                                              $tblDivision = $tblTest->getServiceTblDivision();
                                              $tblSubject = $tblTest->getServiceTblSubject();
                                              $tblSubjectGroup = $tblTest->getServiceTblSubjectGroup();
                                      Severity: Major
                                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                        Method setHighlightedTestsOverview has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function setHighlightedTestsOverview($Data, $IsDivisionTeacher, $PersonId = null)
                                            {
                                                $stage = new Stage('Leistungsüberprüfung', 'Planungsübersicht');
                                                $stage->addButton(new Standard(
                                                    'Zurück',
                                        Severity: Major
                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                          Method setStudentList has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              private function setStudentList(
                                                  TblDivisionSubject $tblDivisionSubject,
                                                  TblTest $tblTest,
                                                  $studentList,
                                                  &$studentTestList,
                                          Severity: Major
                                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                            Method frontendProposalTestSelected has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                public function frontendProposalTestSelected($DivisionId = null)
                                                {
                                                    $stage = new Stage('Kopfnotenvorschlag des Klassenlehrers', 'Übersicht');
                                            
                                                    if (($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
                                            Severity: Major
                                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                              Function contentEditTestGradeTableRow has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  private function contentEditTestGradeTableRow(
                                                      TblPerson $tblPerson,
                                                      $tblGrade,
                                                      $IsEdit,
                                                      $student,
                                              Severity: Minor
                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs 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 setTableContentForAppointedDateTask has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  private function setTableContentForAppointedDateTask(
                                                      TblDivision $tblDivision,
                                                      TblTest $tblTest,
                                                      TblSubject $tblSubject,
                                                      TblPerson $tblPerson,
                                              Severity: Major
                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                                Method setGradeMirror has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    private function setGradeMirror(TblScoreType $tblScoreType = null, $gradeList, $Grade)
                                                    {
                                                        $minRange = null;
                                                        $maxRange = null;
                                                        if ($tblScoreType) {
                                                Severity: Major
                                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                                  Method frontendHeadmasterTaskEdit has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      public function frontendHeadmasterTaskEdit($Id = null, $Task = null)
                                                      {
                                                  
                                                          $Stage = new Stage('Notenauftrag', 'Bearbeiten');
                                                  
                                                  
                                                  Severity: Major
                                                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                                    Function setYearButtonList has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public function setYearButtonList($Route, $IsAllYears, $YearId, &$tblYear, $HasAllYears = true)
                                                        {
                                                    
                                                            $tblYear = false;
                                                            $tblYearList = Term::useService()->getYearByNow();
                                                    Severity: Minor
                                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs 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 frontendHeadmasterTaskDestroy has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        public function frontendHeadmasterTaskDestroy(
                                                            $Id = null,
                                                            $Confirm = false
                                                        ) {
                                                    
                                                    
                                                    Severity: Major
                                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                                      Method contentEditTestGradeTableRow has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          private function contentEditTestGradeTableRow(
                                                              TblPerson $tblPerson,
                                                              $tblGrade,
                                                              $IsEdit,
                                                              $student,
                                                      Severity: Major
                                                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                                                        Function formTest has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                            private function formTest(
                                                                TblDivision $tblDivision,
                                                                TblYear $tblYear,
                                                                TblScoreRule $tblScoreRule = null,
                                                                TblDivisionSubject $tblDivisionSubjectSelected = null
                                                        Severity: Minor
                                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr 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 formTask has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            private function formTask()
                                                            {
                                                        
                                                                $tblTestTypeAllWhereTask = Evaluation::useService()->getTestTypeAllWhereTask();
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                          Method setTableContentForBehaviourTask has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              private function setTableContentForBehaviourTask(
                                                                  TblDivision $tblDivision,
                                                                  TblTest $tblTest,
                                                                  TblPerson $tblPerson,
                                                                  $studentList,
                                                          Severity: Minor
                                                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                            Consider simplifying this complex logical expression.
                                                            Open

                                                                            if ($tblSubject && $tblTestItem->getServiceTblSubject()
                                                                                && $tblSubject->getId() == $tblTestItem->getServiceTblSubject()->getId()
                                                                                && (!$tblTest->getServiceTblSubjectGroup()
                                                                                    || ($tblTest->getServiceTblSubjectGroup() && $tblTestItem->getServiceTblSubjectGroup()
                                                                                        && $tblTest->getServiceTblSubjectGroup()->getId() == $tblTestItem->getServiceTblSubjectGroup()->getId())
                                                            Severity: Critical
                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                              Function frontendHeadmasterTask has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public function frontendHeadmasterTask($Task = null, $IsAllYears = false, $YearId = null)
                                                                  {
                                                              
                                                                      $Stage = new Stage('Notenaufträge', 'Übersicht');
                                                                      $Stage->setMessage(
                                                              Severity: Minor
                                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr 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 setYearButtonList has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  public function setYearButtonList($Route, $IsAllYears, $YearId, &$tblYear, $HasAllYears = true)
                                                                  {
                                                              
                                                                      $tblYear = false;
                                                                      $tblYearList = Term::useService()->getYearByNow();
                                                              Severity: Minor
                                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                                Method setContentForBehaviorTask has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                        TblTest $tblTest,
                                                                        TblTask $tblTask = null,
                                                                        TblDivision $tblDivision,
                                                                        TblSubject $tblSubject,
                                                                        TblTest &$tblNextTest = null,
                                                                Severity: Major
                                                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                                  Method contentEditTestGradeTableRow has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                          TblPerson $tblPerson,
                                                                          $tblGrade,
                                                                          $IsEdit,
                                                                          $student,
                                                                          &$tabIndex,
                                                                  Severity: Major
                                                                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 hr to fix

                                                                    Method setTableContentForAppointedDateTask has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                            TblDivision $tblDivision,
                                                                            TblTest $tblTest,
                                                                            TblSubject $tblSubject,
                                                                            TblPerson $tblPerson,
                                                                            $studentList,
                                                                    Severity: Major
                                                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 50 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                                  if ($tblYear
                                                                                                      && $tblYearItem->getId() != $tblYear->getId()
                                                                                                  ) {
                                                                                                      continue;
                                                                                                  }
                                                                      Severity: Major
                                                                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                                                if (isset($grades[$personId][$gradeTypeId]) && $grades[$personId][$gradeTypeId]['Count'] > 0) {
                                                                                                                    $studentList[$tblDivision->getId()][$personId]['Type' . $gradeTypeId] =
                                                                                                                        new Bold('&#216; ' .
                                                                                                                            round(floatval($grades[$personId][$gradeTypeId]['Sum']) / floatval($grades[$personId][$gradeTypeId]['Count']),
                                                                                                                                2) . ' | ') . $studentListByDivision['Type' . $gradeTypeId];
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                                  if ($showProposalBehaviorGrade) {
                                                                                                                      $proposalGrade = new Warning(new Bold('f'));
                                                                                                                      if (($tblProposalBehaviorGrade = Gradebook::useService()->getProposalBehaviorGrade(
                                                                                                                          $tblDivision, $tblTask, $tblGradeType, $tblPerson
                                                                                                                          )) && $tblProposalBehaviorGrade->getDisplayGrade() !== ''
                                                                          Severity: Major
                                                                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                                    if ($tblDivisionStudentAll) {
                                                                                                                        foreach ($tblDivisionStudentAll as $tblPerson) {
                                                                                                                            if ($this->checkIsPersonInActive($tblDivision, $tblPerson, $taskDate)) {
                                                                                                                                continue;
                                                                                                                            }
                                                                            Severity: Major
                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                                      if ($tblGrade) {
                                                                                                                          if (!$tblTestTemp->isContinues()    // Testdatum
                                                                                                                              || ($tblTestTemp->isContinues()   // Notendatum
                                                                                                                                  && $tblGrade->getDate() && $tblTask->getDate()
                                                                                                                                  && ($taskDate = new \DateTime($tblTask->getDate()))
                                                                              Severity: Major
                                                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                                            if ($posStart !== false) {
                                                                                                                                $average = substr($average, 0, $posStart);
                                                                                                                            }
                                                                                Severity: Major
                                                                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                                              if ($tblPerson) {
                                                                                                                                  if ($this->checkIsPersonInActive($tblDivision, $tblPerson, $taskDate)) {
                                                                                                                                      continue;
                                                                                                                                  }
                                                                                  
                                                                                  
                                                                                  Severity: Major
                                                                                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                                            if ($tblSubjectStudentAllByDivisionSubject) {
                                                                                                                                foreach ($tblSubjectStudentAllByDivisionSubject as $tblSubjectStudent) {
                                                                                    
                                                                                                                                    $tblPerson = $tblSubjectStudent->getServiceTblPerson();
                                                                                                                                    if ($tblPerson) {
                                                                                    Severity: Major
                                                                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                                                  if ($this->checkIsPersonInActive($tblDivision, $tblPerson, $taskDate)) {
                                                                                                                                      continue;
                                                                                                                                  }
                                                                                      Severity: Major
                                                                                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                                    if ($taskDate->format('Y-m-d') >= $testDate->format('Y-m-d')) {
                                                                                                                                        $count++;
                                                                                                                                        $date = $tblTestTemp->getDate();
                                                                                                                                        if (strlen($date) > 6) {
                                                                                                                                            $date = substr($date, 0, 6);
                                                                                        Severity: Major
                                                                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                      if ($tblTest->getDate()
                                                                                                                          && ($testDate = (new \DateTime($tblTest->getDate())))
                                                                                                                          && ($toDateTimeTask = new \DateTime($appointedDateTask->getToDate()))
                                                                                                                          && ($nowDateTime = (new \DateTime('now')))
                                                                                                                          && $testDate <= $toDateTimeTask
                                                                                          Severity: Major
                                                                                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 45 mins to fix

                                                                                            Consider simplifying this complex logical expression.
                                                                                            Open

                                                                                                                    if ($tblDivisionSubject && $tblDivisionSubject->getServiceTblSubject()
                                                                                                                        && $tblDivisionSubject->getTblDivision()
                                                                                                                        && ($tblDivisionSubject->getHasGrading() || (($tblSetting = Consumer::useService()->getSetting(
                                                                                                                                    'Education', 'Graduation', 'Evaluation', 'HasBehaviorGradesForSubjectsWithNoGrading'
                                                                                                                                ))
                                                                                            Severity: Major
                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 40 mins to fix

                                                                                              Consider simplifying this complex logical expression.
                                                                                              Open

                                                                                                                          if ($tblTest->getDate()
                                                                                                                              && ($testDate = (new \DateTime($tblTest->getDate())))
                                                                                                                              && ($toDateTimeTask = new \DateTime($appointedDateTask->getToDate()))
                                                                                                                              && ($nowDateTime = (new \DateTime('now')))
                                                                                                                              && $testDate <= $toDateTimeTask
                                                                                              Severity: Major
                                                                                              Found in Application/Education/Graduation/Evaluation/Frontend.php - About 40 mins to fix

                                                                                                Consider simplifying this complex logical expression.
                                                                                                Open

                                                                                                                            if (($date = $tblTaskItem->getDate())
                                                                                                                                && ($tblPeriod = $tblTest->getServiceTblPeriod())
                                                                                                                                && ($toDatePeriod = $tblPeriod->getToDate())
                                                                                                                                && ($dateTimeTask = new \DateTime($date))
                                                                                                                                && ($toDateTimePeriod = new \DateTime($toDatePeriod))
                                                                                                Severity: Major
                                                                                                Found in Application/Education/Graduation/Evaluation/Frontend.php - About 40 mins to fix

                                                                                                  Method contentEditTestGrade has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      private function contentEditTestGrade(Stage $Stage, TblTest $tblTest, $Grade, $BasicRoute, $IsEdit = false)
                                                                                                  Severity: Minor
                                                                                                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 35 mins to fix

                                                                                                    Method setStudentList has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                            TblDivisionSubject $tblDivisionSubject,
                                                                                                            TblTest $tblTest,
                                                                                                            $studentList,
                                                                                                            &$studentTestList,
                                                                                                            $isDivisionSubjectNamed = false
                                                                                                    Severity: Minor
                                                                                                    Found in Application/Education/Graduation/Evaluation/Frontend.php - About 35 mins to fix

                                                                                                      Method setYearButtonList has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          public function setYearButtonList($Route, $IsAllYears, $YearId, &$tblYear, $HasAllYears = true)
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 35 mins to fix

                                                                                                        Method setTableContentForBehaviourTask has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                                TblDivision $tblDivision,
                                                                                                                TblTest $tblTest,
                                                                                                                TblPerson $tblPerson,
                                                                                                                $studentList,
                                                                                                                $grades
                                                                                                        Severity: Minor
                                                                                                        Found in Application/Education/Graduation/Evaluation/Frontend.php - About 35 mins to fix

                                                                                                          Method setGradeOverviewForTask has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                  TblTask $tblTask,
                                                                                                                  $divisionList,
                                                                                                                  $tableHeaderList,
                                                                                                                  $studentList,
                                                                                                                  $tableList
                                                                                                          Severity: Minor
                                                                                                          Found in Application/Education/Graduation/Evaluation/Frontend.php - About 35 mins to fix

                                                                                                            Function frontendHeadmasterTaskDestroy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                public function frontendHeadmasterTaskDestroy(
                                                                                                                    $Id = null,
                                                                                                                    $Confirm = false
                                                                                                                ) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Minor
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php - About 25 mins 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

                                                                                                                    if (!empty($divisionSubjectList)) {
                                                                                                                        foreach ($divisionSubjectList as $divisionId => $subjectList) {
                                                                                                                            $tblDivision = Division::useService()->getDivisionById($divisionId);
                                                                                                                            if ($tblDivision) {
                                                                                                                                foreach ($subjectList as $subjectId => $value) {
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 306..351

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

                                                                                                            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 (!empty($divisionSubjectList)) {
                                                                                                                        foreach ($divisionSubjectList as $divisionId => $subjectList) {
                                                                                                                            $tblDivision = Division::useService()->getDivisionById($divisionId);
                                                                                                                            if ($tblDivision) {
                                                                                                                                foreach ($subjectList as $subjectId => $value) {
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 480..526

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

                                                                                                            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 ($tblScoreType) {
                                                                                                                            if ($tblScoreType->getIdentifier() == 'VERBAL') {
                                                                                                                                $student[$tblPerson->getId()]['Grade']
                                                                                                                                    = (new TextField('Grade[' . $tblPerson->getId() . '][Grade]', '', '',
                                                                                                                                    new Quote()))->setTabIndex($tabIndex++);
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 4665..4688

                                                                                                            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 ($tblScoreType) {
                                                                                                                                    if ($tblScoreType->getIdentifier() == 'VERBAL') {
                                                                                                                                        $studentList[$tblPerson->getId()]['Grade']
                                                                                                                                            = (new TextField('Grade[' . $tblPerson->getId() . '][Grade]', '', '',
                                                                                                                                            new Quote()))->setTabIndex($tabIndex++);
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 2631..2656

                                                                                                            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

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

                                                                                                                        if ($tblScoreType) {
                                                                                                                            $selectList[-1] = '';
                                                                                                                            if ($tblScoreType->getIdentifier() == 'GRADES') {
                                                                                                                                for ($i = 1; $i < 6; $i++) {
                                                                                                                                    $selectList[$i . '+'] = (string)($i . '+');
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 2386..2407

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

                                                                                                            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 ($tblScoreType) {
                                                                                                                            $selectList[-1] = '';
                                                                                                                            if ($tblScoreType->getIdentifier() == 'GRADES') {
                                                                                                                                for ($i = 1; $i < 6; $i++) {
                                                                                                                                    $selectList[$i . '+'] = (string)($i . '+');
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 day to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 4576..4599

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

                                                                                                            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 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                                    if ($tblDivisionSubject && $tblDivisionSubject->getServiceTblSubject()
                                                                                                                                        && $tblDivisionSubject->getTblDivision()
                                                                                                                                        && ($tblDivisionSubject->getHasGrading() || (($tblSetting = Consumer::useService()->getSetting(
                                                                                                                                                    'Education', 'Graduation', 'Evaluation', 'HasBehaviorGradesForSubjectsWithNoGrading'
                                                                                                                                                ))
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 2 other locations - About 4 hrs to fix
                                                                                                            Application/Education/Graduation/Gradebook/Frontend.php on lines 442..470
                                                                                                            Application/Education/Graduation/Gradebook/Frontend.php on lines 638..665

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

                                                                                                            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 frontendHeadmasterTestSelected(
                                                                                                                    $DivisionSubjectId = null,
                                                                                                                    $Test = null
                                                                                                                ) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 3 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 898..919

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

                                                                                                            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 frontendTestSelected(
                                                                                                                    $DivisionSubjectId = null,
                                                                                                                    $Test = null
                                                                                                                ) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 3 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 1459..1481

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

                                                                                                            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

                                                                                                                                            } elseif (strpos($column, 'ExtraGrades') !== false) {
                                                                                                                                                $periodId = str_replace('ExtraGrades', '', $column);
                                                                                                                                                if ($gradeListFromAnotherDivision && isset($gradeListFromAnotherDivision[$periodId][$tblPerson->getId()])) {
                                                                                                                                                    $data[$column] = implode(', ', $gradeListFromAnotherDivision[$periodId][$tblPerson->getId()])
                                                                                                                                                        . '&nbsp;'
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 3 hrs to fix
                                                                                                            Application/Education/Graduation/Gradebook/Frontend.php on lines 1218..1228

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

                                                                                                            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 (count($tblDivisionAllByTask) > 1) {
                                                                                                                            /** @var TblDivision $tblDivision */
                                                                                                                            foreach ($tblDivisionAllByTask as $tblDivision) {
                                                                                                                                if ($tblCurrentDivision && $tblCurrentDivision->getId() == $tblDivision->getId()) {
                                                                                                                                    $buttonList[] = new Standard(
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 3 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 3044..3069

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

                                                                                                            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 (count($tblDivisionAllByTask) > 1) {
                                                                                                                            /** @var TblDivision $tblDivision */
                                                                                                                            foreach ($tblDivisionAllByTask as $tblDivision) {
                                                                                                                                if ($tblCurrentDivision && $tblCurrentDivision->getId() == $tblDivision->getId()) {
                                                                                                                                    $buttonList[] = new Standard(
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 3 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 3608..3633

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

                                                                                                            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

                                                                                                                        $tableData = new TableData($studentList, null, $tableColumns, array(
                                                                                                                            "paging"         => false, // Deaktivieren Blättern
                                                                                                                            "iDisplayLength" => -1,    // Alle Einträge zeigen
                                                                                                                            "searching"      => false, // Deaktivieren Suchen
                                                                                                                            "info"           => false,  // Deaktivieren Such-Info
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 2 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 4698..4712

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

                                                                                                            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

                                                                                                                    $tableData = new TableData($studentList, null, $tableColumns, array(
                                                                                                                        "paging" => false, // Deaktivieren Blättern
                                                                                                                        "iDisplayLength" => -1,    // Alle Einträge zeigen
                                                                                                                        "searching" => false, // Deaktivieren Suchen
                                                                                                                        "info" => false,  // Deaktivieren Such-Info
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 2 hrs to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 2464..2478

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

                                                                                                            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

                                                                                                                        foreach ($tblYearList as $tblYearItem) {
                                                                                                                            if ($tblYear && $tblYear->getId() == $tblYearItem->getId()) {
                                                                                                                                $buttonList[] = (new Standard(new Info(new Bold($tblYearItem->getDisplayName())),
                                                                                                                                    $Route, new Edit(), array('YearId' => $tblYearItem->getId())));
                                                                                                                            } else {
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 2 hrs to fix
                                                                                                            Application/Education/Certificate/Prepare/Service.php on lines 2996..3004

                                                                                                            Duplicated Code

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

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

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

                                                                                                            Tuning

                                                                                                            This issue has a mass of 123.

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

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

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

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

                                                                                                            Refactorings

                                                                                                            Further Reading

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

                                                                                                                                        if ($tblSubjectTeacher->getTblDivisionSubject()->getServiceTblSubject()
                                                                                                                                            && $tblDivisionSubject->getServiceTblSubject()
                                                                                                                                        ) {
                                                                                                                                            $tblDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject
                                                                                                                                                = Division::useService()->getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject(
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Graduation/Gradebook/Frontend.php on lines 402..420

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

                                                                                                            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 frontendDestroyTest(
                                                                                                                    $Id = null,
                                                                                                                    $Confirm = false
                                                                                                                ) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 1835..1848

                                                                                                            Duplicated Code

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

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

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

                                                                                                            Tuning

                                                                                                            This issue has a mass of 112.

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

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

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

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

                                                                                                            Refactorings

                                                                                                            Further Reading

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

                                                                                                                public function frontendHeadmasterDestroyTest(
                                                                                                                    $Id = null,
                                                                                                                    $Confirm = false
                                                                                                                ) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 1722..1735

                                                                                                            Duplicated Code

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

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

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

                                                                                                            Tuning

                                                                                                            This issue has a mass of 112.

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

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

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

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

                                                                                                            Refactorings

                                                                                                            Further Reading

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

                                                                                                                                : new FormRow(array(
                                                                                                                                new FormColumn(
                                                                                                                                    new DatePicker('Test[Date]', '', 'Datum', new Calendar()), 4
                                                                                                                                ),
                                                                                                                                new FormColumn(
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 878..888

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

                                                                                                            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

                                                                                                                        new FormRow(array(
                                                                                                                            new FormColumn(
                                                                                                                                new DatePicker('Task[Date]', '', 'Stichtag', new Calendar()), 4
                                                                                                                            ),
                                                                                                                            new FormColumn(
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Graduation/Evaluation/Frontend.php on lines 1588..1598

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

                                                                                                            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 ($HasAllYears) {
                                                                                                                            if ($IsAllYears) {
                                                                                                                                $buttonList[] = (new Standard(new Info(new Bold('Alle Schuljahre')),
                                                                                                                                    $Route, new Edit(), array('IsAllYears' => true)));
                                                                                                                            } else {
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Graduation/Evaluation/Frontend.php and 1 other location - About 1 hr to fix
                                                                                                            Application/Education/Certificate/Prepare/Service.php on lines 3008..3016

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

                                                                                                            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