DerDu/SPHERE-Framework

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

Summary

Maintainability
F
2 mos
Test Coverage

Function setGradeOverview has a Cognitive Complexity of 571 (exceeds 5 allowed). Consider refactoring.
Open

    private function setGradeOverview(
        TblYear $tblYear,
        TblPerson $tblPerson,
        $divisionList,
        &$rowList,
Severity: Minor
Found in Application/Education/Graduation/Gradebook/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

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

<?php

namespace SPHERE\Application\Education\Graduation\Gradebook;

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

    Function contentSelectedGradeBook has a Cognitive Complexity of 318 (exceeds 5 allowed). Consider refactoring.
    Open

        private function contentSelectedGradeBook(
            Stage $Stage,
            TblDivisionSubject $tblDivisionSubject,
            $BasicRoute
        ) {
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 6 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function frontendStudentGradebook has a Cognitive Complexity of 207 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendStudentGradebook($YearId = null, $ParentAccount = null)
        {
    
            $Stage = new Stage('Notenübersicht', 'Schüler/Eltern');
            $Stage->setMessage(
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 4 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function setSelectStudentStage has a Cognitive Complexity of 187 (exceeds 5 allowed). Consider refactoring.
    Open

        private function setSelectStudentStage(Stage $Stage, $DivisionId = null, $GroupId = null, $IsHeadmaster = false)
        {
    
            $tblGroup = false;
            $tblGroupTudor = Group::useService()->getGroupByMetaTable(TblGroup::META_TABLE_TUDOR);
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/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

    Function frontendScoreTypeSelect has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendScoreTypeSelect(
            $Id = null,
            $YearId = null,
            $Data = null
        ) {
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/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

    Function frontendTeacherGradebook has a Cognitive Complexity of 133 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendTeacherGradebook($IsAllYears = false, $YearId = null)
        {
    
            $Stage = new Stage('Notenbuch', 'Auswahl');
            $Stage->setMessage(
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/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

    Method contentSelectedGradeBook has 463 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function contentSelectedGradeBook(
            Stage $Stage,
            TblDivisionSubject $tblDivisionSubject,
            $BasicRoute
        ) {
    Severity: Major
    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 days to fix

      Method frontendStudentGradebook has 290 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function frontendStudentGradebook($YearId = null, $ParentAccount = null)
          {
      
              $Stage = new Stage('Notenübersicht', 'Schüler/Eltern');
              $Stage->setMessage(
      Severity: Major
      Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 day to fix

        Function frontendHeadmasterGradeBook has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
        Open

            public function frontendHeadmasterGradeBook($IsAllYears = false, $YearId = null)
            {
        
                $Stage = new Stage('Notenbuch', 'Auswahl');
                $Stage->setMessage(
        Severity: Minor
        Found in Application/Education/Graduation/Gradebook/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 setGradeOverview has 284 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function setGradeOverview(
                TblYear $tblYear,
                TblPerson $tblPerson,
                $divisionList,
                &$rowList,
        Severity: Major
        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 day to fix

          Method frontendTeacherGradebook has 224 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method setSelectStudentStage has 218 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function setSelectStudentStage(Stage $Stage, $DivisionId = null, $GroupId = null, $IsHeadmaster = false)
                {
            
                    $tblGroup = false;
                    $tblGroupTudor = Group::useService()->getGroupByMetaTable(TblGroup::META_TABLE_TUDOR);
            Severity: Major
            Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 day to fix

              Method frontendScoreTypeSelect has 191 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendScoreTypeSelect(
                      $Id = null,
                      $YearId = null,
                      $Data = null
                  ) {
              Severity: Major
              Found in Application/Education/Graduation/Gradebook/Frontend.php - About 7 hrs to fix

                Method frontendHeadmasterGradeBook has 166 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function setStudentOverviewStage has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function setStudentOverviewStage(
                          $DivisionId,
                          $GroupId,
                          $PersonId,
                          Stage $Stage,
                  Severity: Minor
                  Found in Application/Education/Graduation/Gradebook/Frontend.php - About 5 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 frontendTeacherDivisionList has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function frontendTeacherDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
                      {
                  
                          $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
                          $Stage->addButton(
                  Severity: Minor
                  Found in Application/Education/Graduation/Gradebook/Frontend.php - About 5 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 setStudentOverviewStage has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function setStudentOverviewStage(
                          $DivisionId,
                          $GroupId,
                          $PersonId,
                          Stage $Stage,
                  Severity: Major
                  Found in Application/Education/Graduation/Gradebook/Frontend.php - About 5 hrs to fix

                    Function addTest has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function addTest(TblTest $tblTest,TblGrade $tblGrade = null, &$subTableHeaderList, &$subTableDataList, $hasScore, $showDivisionInToolTip)
                        {
                            if ($tblTest->isContinues()) {
                                if ($tblGrade && $tblGrade->getDate()) {
                                    $date = $tblGrade->getDate();
                    Severity: Minor
                    Found in Application/Education/Graduation/Gradebook/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 frontendTeacherDivisionList has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function frontendTeacherDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
                        {
                    
                            $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
                            $Stage->addButton(
                    Severity: Major
                    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 4 hrs to fix

                      Method frontendHeadmasterDivisionList has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendHeadmasterDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
                          {
                      
                              $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
                              $Stage->addButton(
                      Severity: Major
                      Found in Application/Education/Graduation/Gradebook/Frontend.php - About 3 hrs to fix

                        Method frontendGradeType has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendGradeType($GradeType = null)
                            {
                        
                                $Stage = new Stage('Zensuren-Typ', 'Übersicht');
                                $Stage->setMessage('Hier werden die Zensuren-Typen verwaltet. Bei den Zensuren-Typen wird zwischen den beiden
                        Severity: Major
                        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 3 hrs to fix

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

                          class Frontend extends FrontendScoreRule
                          {
                          
                              /**
                               * @param null $GradeType
                          Severity: Minor
                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 3 hrs to fix

                            Method addTest has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function addTest(TblTest $tblTest,TblGrade $tblGrade = null, &$subTableHeaderList, &$subTableDataList, $hasScore, $showDivisionInToolTip)
                                {
                                    if ($tblTest->isContinues()) {
                                        if ($tblGrade && $tblGrade->getDate()) {
                                            $date = $tblGrade->getDate();
                            Severity: Major
                            Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 hrs to fix

                              Method getMinimumGradeCountPanel has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function getMinimumGradeCountPanel($tblMinimumGradeCountList, $isSekII)
                                  {
                              
                                      if ($tblMinimumGradeCountList) {
                              
                              
                              Severity: Major
                              Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 hrs to fix

                                Function frontendHeadmasterDivisionList has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function frontendHeadmasterDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
                                    {
                                
                                        $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
                                        $Stage->addButton(
                                Severity: Minor
                                Found in Application/Education/Graduation/Gradebook/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 frontendEditGradeType has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function frontendEditGradeType($Id = null, $GradeType = null)
                                    {
                                
                                        $Stage = new Stage('Zensuren-Typ', 'Bearbeiten');
                                
                                
                                Severity: Major
                                Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 hrs to fix

                                  Method frontendDestroyGradeType has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

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

                                        private function getPersonListForStudent()
                                        {
                                            $tblPerson = false;
                                            $tblAccount = Account::useService()->getAccountBySession();
                                            if ($tblAccount) {
                                    Severity: Minor
                                    Found in Application/Education/Graduation/Gradebook/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 setGradeOverview has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            TblYear $tblYear,
                                            TblPerson $tblPerson,
                                            $divisionList,
                                            &$rowList,
                                            $tblPeriodList,
                                    Severity: Major
                                    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 hr to fix

                                      Method formGradeType has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function formGradeType()
                                          {
                                      
                                              $type = Evaluation::useService()->getTestTypeByIdentifier('TEST');
                                              $typeList[$type->getId()] = $type->getName();
                                      Severity: Minor
                                      Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 hr to fix

                                        Method frontendScoreType has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function frontendScoreType()
                                            {
                                        
                                                $Stage = new Stage('Bewertungssystem', 'Übersicht');
                                                $Stage->setMessage(
                                        Severity: Minor
                                        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 hr to fix

                                          Function getMinimumGradeCountPanel has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              private function getMinimumGradeCountPanel($tblMinimumGradeCountList, $isSekII)
                                              {
                                          
                                                  if ($tblMinimumGradeCountList) {
                                          
                                          
                                          Severity: Minor
                                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 55 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

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                              if ($average != '') {
                                                                                  if (isset($averages[$column])) {
                                                                                      $averages[$column]['Count']++;
                                                                                      $averages[$column]['Sum'] += $average;
                                                                                  } else {
                                          Severity: Major
                                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                            Method setStudentOverviewStage has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                    $DivisionId,
                                                    $GroupId,
                                                    $PersonId,
                                                    Stage $Stage,
                                                    $Route,
                                            Severity: Minor
                                            Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                                      if ($tblScoreRuleDivisionSubject->getTblScoreType()
                                                                                          && $tblScoreRuleDivisionSubject->getTblScoreType()->getId() == $tblScoreType->getId()
                                                                                      ) {
                                                                                          $Global->POST['Data'][$tblDivision->getId()][$subject->getId()] = 1;
                                                                                      }
                                              Severity: Major
                                              Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                                        if (($tblPersonItem = $tblGradeItem->getServiceTblPerson())
                                                                                            && !isset($studentArray[$tblPersonItem->getId()])
                                                                                        ) {
                                                                                            $addStudentList[$tblPersonItem->getId()] = $tblPersonItem;
                                                                                        }
                                                Severity: Major
                                                Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

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

                                                    Method addTest has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        private function addTest(TblTest $tblTest,TblGrade $tblGrade = null, &$subTableHeaderList, &$subTableDataList, $hasScore, $showDivisionInToolTip)
                                                    Severity: Minor
                                                    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                      if(!in_array($tblSchoolType->getId(), $tblSchoolTypeList)){
                                                                                          // Klassen werden nicht angezeigt, wenn die Schulart nicht freigeben ist.
                                                                                          continue;
                                                                                      }
                                                      Severity: Major
                                                      Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                    if ($tblPeriodList) {
                                                                                        $tableHeaderList['Subject'] = 'Fach';
                                                                                        foreach ($tblPeriodList as $tblPeriod) {
                                                                                            $tableHeaderList['Period' . $tblPeriod->getId()] = new Bold($tblPeriod->getDisplayName());
                                                                                        }
                                                        Severity: Major
                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                              if ($tblTest->isContinues() && $tblGrade->getDate()) {
                                                                                                  if (strlen($tblGrade->getDate()) > 6) {
                                                                                                      $displayGradeDate = substr($tblGrade->getDate(), 0, 6);
                                                                                                  }
                                                                                              } elseif ($tblTest->isContinues() && $tblTest->getFinishDate()) {
                                                          Severity: Major
                                                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                        if ($Relationship->getServiceTblPersonFrom() == $tblPersonSession->getId()) {
                                                                                            $ParentList[] = $Relationship->getServiceTblPersonTo();
                                                                                        } elseif ($Relationship->getServiceTblPersonTo() == $tblPersonSession->getId()) {
                                                                                            $ParentList[] = $Relationship->getServiceTblPersonFrom();
                                                                                        }
                                                            Severity: Major
                                                            Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                                      if (is_array($average)) {
                                                                                                          $average = 'Fehler';
                                                                                                      } elseif (is_string($average) && strpos($average, '(')) {
                                                                                                          $average = substr($average, 0, strpos($average, '('));
                                                                                                      }
                                                              Severity: Major
                                                              Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                        if ($tblCommon && ($tblCommonBirthDates = $tblCommon->getTblCommonBirthDates())) {
                                                                
                                                                                            $Now = new \DateTime();
                                                                                            $Now->modify('-18 year');
                                                                
                                                                
                                                                Severity: Major
                                                                Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                                  if (!$tblDivisionSubject->getTblSubjectGroup()) {
                                                                                                      $hasStudentSubject = false;
                                                                                                      $tblDivisionSubjectWhereGroup =
                                                                                                          Division::useService()->getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject(
                                                                                                              $tblDivision,
                                                                  Severity: Major
                                                                  Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                                        if ($posStart !== false) {
                                                                                                            $posEnd = strpos($average, ')');
                                                                                                            if ($posEnd !== false) {
                                                                                                               $priority = substr($average, $posStart + 1, $posEnd - ($posStart + 1));
                                                                                                            }
                                                                    Severity: Major
                                                                    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 45 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/Gradebook/Frontend.php - About 40 mins to fix

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

                                                                            public function frontendEditGradeType($Id = null, $GradeType = null)
                                                                            {
                                                                        
                                                                                $Stage = new Stage('Zensuren-Typ', 'Bearbeiten');
                                                                        
                                                                        
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Gradebook/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/Gradebook/Frontend.php and 1 other location - About 1 day to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 497..550

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

                                                                        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/Gradebook/Frontend.php and 1 other location - About 1 day to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 671..725

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            public function frontendActivateGradeType(
                                                                                $Id = null
                                                                            ) {
                                                                        
                                                                                $Route = '/Education/Graduation/Gradebook/GradeType';
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 2 other locations - About 1 day to fix
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 2120..2150
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 2218..2248

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

                                                                        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 (is_array($average)) {
                                                                                                            $errorRowList = $average;
                                                                                                            $average = '';
                                                                                                        } else {
                                                                                                            $posStart = strpos($average, '(');
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 6 hrs to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 1181..1204

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

                                                                        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 (is_array($average)) {
                                                                                                        $errorRowList = $average;
                                                                                                        $average = '';
                                                                                                    } else {
                                                                                                        $posStart = strpos($average, '(');
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 6 hrs to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 1142..1165

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

                                                                        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()
                                                                                                        ) {
                                                                                                            if ($tblDivisionSubject->getTblSubjectGroup()) {
                                                                                                                $divisionSubjectList[$tblDivisionSubject->getTblDivision()->getId()]
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 2 other locations - About 4 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Frontend.php on lines 443..474
                                                                        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

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

                                                                                                if ($tblDivisionSubject->getServiceTblSubject() && $tblDivisionSubject->getTblDivision()
                                                                                                    && $tblDivisionSubject->getHasGrading()
                                                                                                ) {
                                                                                                    if ($tblDivisionSubject->getTblSubjectGroup()) {
                                                                                                        $divisionSubjectList[$tblDivisionSubject->getTblDivision()->getId()]
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 2 other locations - About 4 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Frontend.php on lines 443..474
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 442..470

                                                                        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

                                                                        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/Gradebook/Frontend.php and 1 other location - About 3 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Frontend.php on lines 2325..2335

                                                                        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

                                                                            public function frontendHeadmasterStudentOverview($DivisionId = null, $GroupId = null, $PersonId = null, $IsParentView = false)
                                                                            {
                                                                                $Stage = new Stage('Schülerübersicht', 'Schüler anzeigen');
                                                                                $Stage->addButton(new Standard(
                                                                                    'Zurück', '/Education/Graduation/Gradebook/Gradebook/Headmaster/Division/Student', new ChevronLeft(), array(
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 2403..2422

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 121.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            public function frontendTeacherStudentOverview($DivisionId = null, $GroupId = null, $PersonId = null, $IsParentView = false)
                                                                            {
                                                                        
                                                                                $Stage = new Stage('Schülerübersicht', 'Schüler anzeigen');
                                                                                $Stage->addButton(new Standard(
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 2375..2393

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 121.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                } else {
                                                                                                    $tblDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject
                                                                                                        = Division::useService()->getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject(
                                                                                                        $tblDivisionSubject->getTblDivision(),
                                                                                                        $tblSubjectTeacher->getTblDivisionSubject()->getServiceTblSubject()
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Evaluation/Frontend.php on lines 194..214

                                                                        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 frontendTeacherSelectedGradebook($DivisionSubjectId = null)
                                                                            {
                                                                        
                                                                                $Stage = new Stage('Notenbuch', 'Anzeigen');
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 1351..1366

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

                                                                        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 frontendHeadmasterSelectedGradeBook(
                                                                                $DivisionSubjectId = null
                                                                            ) {
                                                                        
                                                                                $Stage = new Stage('Notenbuch', 'Anzeigen');
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Gradebook/Frontend.php on lines 789..803

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

                                                                        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 ($Data == null) {
                                                                                                        $Global = $this->getGlobal();
                                                                                                        /** @var TblSubject $subject */
                                                                                                        foreach ($subjectList as $subject) {
                                                                                                            $tblScoreRuleDivisionSubject = Gradebook::useService()->getScoreRuleDivisionSubjectByDivisionAndSubject(
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 1625..1640

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (!$Confirm) {
                                                                                        $Stage->setContent(
                                                                                            new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(array(
                                                                                                new Panel(
                                                                                                    'Zensuren-Typ',
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 3 other locations - About 1 hr to fix
                                                                        Application/Education/Graduation/Gradebook/MinimumGradeCount/Frontend.php on lines 445..481
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 1982..2016
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 2073..2105

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

                                                                        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

                                                                                $Stage->setContent(
                                                                                    new Layout(array(
                                                                                        new LayoutGroup(array(
                                                                                            new LayoutRow(array(
                                                                                                empty($buttonList)
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Certificate/Prepare/Frontend.php on lines 368..381

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

                                                                        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 ($tblSubject->getId() === -1) {
                                                                                                            $name = new Italic((
                                                                                                                $tblSubject->getAcronym() ? new Bold($tblSubject->getAcronym() . ' ') : '') . $tblSubject->getName()
                                                                                                            );
                                                                                                        } else {
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Gradebook/Frontend.php and 1 other location - About 55 mins to fix
                                                                        Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php on lines 1647..1653

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

                                                                        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