DerDu/SPHERE-Framework

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

Summary

Maintainability
F
1 mo
Test Coverage

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

<?php

namespace SPHERE\Application\Education\Graduation\Evaluation;

use SPHERE\Application\Education\Graduation\Evaluation\Service\Data;
Severity: Major
Found in Application/Education/Graduation/Evaluation/Service.php - About 3 days to fix

    Function updateDivisionTasks has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateDivisionTasks(IFormInterface $Stage = null, $Id, $Data = null)
        {
    
            /**
             * Skip to Frontend
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 2 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function setCurrentTaskList has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring.
    Open

        private function setCurrentTaskList(
            TblDivision $tblDivision,
            TblSubject $tblSubject,
            TblSubjectGroup $tblSubjectGroup = null,
            TblTestType $tblTestType,
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 2 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getLayoutRowsForTestPlanning has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getLayoutRowsForTestPlanning($testArray)
        {
            $preview = array();
            if (!empty($testArray)) {
                $trans = array(
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getTeacherWelcome has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getTeacherWelcome(TblPerson $tblPerson)
        {
    
            $appointedDateTaskList = array();
            $behaviorTask = array();
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getTestLinkPanel has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getTestLinkPanel(
            TblYear $tblYear,
            TblDivisionSubject $tblDivisionSubjectSelected
        ) {
            $panel = false;
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function createTest has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createTest(IFormInterface $Stage = null, $DivisionSubjectId = null, $Test = null, $BasicRoute)
        {
    
            /**
             * Skip to Frontend
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.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

    Service has 45 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Service extends AbstractService
    {
    
        /**
         * @param bool $doSimulation
    Severity: Minor
    Found in Application/Education/Graduation/Evaluation/Service.php - About 6 hrs to fix

      Method setCurrentTaskList has 151 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function setCurrentTaskList(
              TblDivision $tblDivision,
              TblSubject $tblSubject,
              TblSubjectGroup $tblSubjectGroup = null,
              TblTestType $tblTestType,
      Severity: Major
      Found in Application/Education/Graduation/Evaluation/Service.php - About 6 hrs to fix

        Function addDivisionToAppointedDateTask has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
        Open

            public function addDivisionToAppointedDateTask(
                TblTask $tblTask,
                TblDivision $tblDivision
            ) {
        
        
        Severity: Minor
        Found in Application/Education/Graduation/Evaluation/Service.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 getTeacherWelcome has 127 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getTeacherWelcome(TblPerson $tblPerson)
            {
        
                $appointedDateTaskList = array();
                $behaviorTask = array();
        Severity: Major
        Found in Application/Education/Graduation/Evaluation/Service.php - About 5 hrs to fix

          Method createTest has 114 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createTest(IFormInterface $Stage = null, $DivisionSubjectId = null, $Test = null, $BasicRoute)
              {
          
                  /**
                   * Skip to Frontend
          Severity: Major
          Found in Application/Education/Graduation/Evaluation/Service.php - About 4 hrs to fix

            Method getLayoutRowsForTestPlanning has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getLayoutRowsForTestPlanning($testArray)
                {
                    $preview = array();
                    if (!empty($testArray)) {
                        $trans = array(
            Severity: Major
            Found in Application/Education/Graduation/Evaluation/Service.php - About 4 hrs to fix

              Method updateDivisionTasks has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function updateDivisionTasks(IFormInterface $Stage = null, $Id, $Data = null)
                  {
              
                      /**
                       * Skip to Frontend
              Severity: Major
              Found in Application/Education/Graduation/Evaluation/Service.php - About 3 hrs to fix

                Function getTestListForPlanning has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getTestListForPlanning($tblDivisionList, TblGradeType $tblGradeType = null, $isHighlighted = false)
                    {
                
                        $result = array();
                        $tblGradeTypeList = array();
                Severity: Minor
                Found in Application/Education/Graduation/Evaluation/Service.php - About 3 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

                Function sortTestList has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function sortTestList($tblTestList)
                    {
                
                        if (($tblSetting = Consumer::useService()->getSetting(
                                'Education', 'Graduation', 'Gradebook', 'SortHighlighted'
                Severity: Minor
                Found in Application/Education/Graduation/Evaluation/Service.php - About 3 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

                Method getTestLinkPanel has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getTestLinkPanel(
                        TblYear $tblYear,
                        TblDivisionSubject $tblDivisionSubjectSelected
                    ) {
                        $panel = false;
                Severity: Major
                Found in Application/Education/Graduation/Evaluation/Service.php - About 3 hrs to fix

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

                      public function updateTest(IFormInterface $Stage = null, $Id, $Test, $BasicRoute)
                      {
                  
                          /**
                           * Skip to Frontend
                  Severity: Minor
                  Found in Application/Education/Graduation/Evaluation/Service.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 updateTest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function updateTest(IFormInterface $Stage = null, $Id, $Test, $BasicRoute)
                      {
                  
                          /**
                           * Skip to Frontend
                  Severity: Major
                  Found in Application/Education/Graduation/Evaluation/Service.php - About 2 hrs to fix

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

                        public function addBehaviorGradeTypeToDivisionAndTask(
                            TblTask $tblTask,
                            TblDivision $tblDivision,
                            TblGradeType $tblGradeType
                        ) {
                    Severity: Minor
                    Found in Application/Education/Graduation/Evaluation/Service.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

                    Function createTask has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function createTask(IFormInterface $Stage = null, $Task, TblYear $tblYear = null)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Minor
                    Found in Application/Education/Graduation/Evaluation/Service.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

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

                        public function updateTask(IFormInterface $Stage = null, $Id, $Task)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Minor
                    Found in Application/Education/Graduation/Evaluation/Service.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 updateTask has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function updateTask(IFormInterface $Stage = null, $Id, $Task)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Major
                    Found in Application/Education/Graduation/Evaluation/Service.php - About 2 hrs to fix

                      Function setWelcomeContent has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function setWelcomeContent($taskList, $columns, $isFuture = false)
                          {
                              foreach ($taskList as $taskId => $list) {
                                  if (($tblTask = Evaluation::useService()->getTaskById($taskId))
                                      && $tblTestType = $tblTask->getTblTestType()
                      Severity: Minor
                      Found in Application/Education/Graduation/Evaluation/Service.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 createTask has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createTask(IFormInterface $Stage = null, $Task, TblYear $tblYear = null)
                          {
                      
                              /**
                               * Skip to Frontend
                      Severity: Major
                      Found in Application/Education/Graduation/Evaluation/Service.php - About 2 hrs to fix

                        Method addDivisionToAppointedDateTask has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function addDivisionToAppointedDateTask(
                                TblTask $tblTask,
                                TblDivision $tblDivision
                            ) {
                        
                        
                        Severity: Minor
                        Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                          Method addBehaviorGradeTypeToDivisionAndTask has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function addBehaviorGradeTypeToDivisionAndTask(
                                  TblTask $tblTask,
                                  TblDivision $tblDivision,
                                  TblGradeType $tblGradeType
                              ) {
                          Severity: Minor
                          Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                            Method sortTestList has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function sortTestList($tblTestList)
                                {
                            
                                    if (($tblSetting = Consumer::useService()->getSetting(
                                            'Education', 'Graduation', 'Gradebook', 'SortHighlighted'
                            Severity: Minor
                            Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                              Method setWelcomeContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function setWelcomeContent($taskList, $columns, $isFuture = false)
                                  {
                                      foreach ($taskList as $taskId => $list) {
                                          if (($tblTask = Evaluation::useService()->getTaskById($taskId))
                                              && $tblTestType = $tblTask->getTblTestType()
                              Severity: Minor
                              Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                                Method getTestListForPlanning has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getTestListForPlanning($tblDivisionList, TblGradeType $tblGradeType = null, $isHighlighted = false)
                                    {
                                
                                        $result = array();
                                        $tblGradeTypeList = array();
                                Severity: Minor
                                Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if (($tblTask = $tblTest->getTblTask())
                                                      && $tblTask->getFromDate()
                                                      && $tblTask->getToDate()
                                                      && ($fromDate = new \DateTime($tblTask->getFromDate()))
                                                      && ($toDate = new \DateTime($tblTask->getToDate()))
                                  Severity: Major
                                  Found in Application/Education/Graduation/Evaluation/Service.php - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                    if ($tblPersonList) {
                                                                        foreach ($tblPersonList as $tblPerson) {
                                                                            $TeacherAcronym = new ToolTip(new Small(new NotAvailable())
                                                                                ,
                                                                                'Lehrer ' . $tblPerson->getLastFirstName() . ' besitzt kein Lehrerkürzel');
                                    Severity: Major
                                    Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if ($tblPeriod->getId() == $tblPeriodOrigin->getId()) {
                                                                          if (isset($tblPeriodLinkList[$periodPosition])) {
                                                                              $tblPeriodLink = $tblPeriodLinkList[$periodPosition];
                                                                          }
                                                                          break;
                                      Severity: Major
                                      Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                        if (!$this->existsTestByTask($tblTask, $tblDivision,
                                                                            $tblDivisionSubject->getServiceTblSubject())
                                                                        ) {
                                                                            (new Data($this->getBinding()))->createTest(
                                                                                $tblDivision,
                                        Severity: Major
                                        Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      if (($tblDivision = $tblDivisionSubject->getTblDivision())
                                                                          && $tblDivision->getServiceTblYear()
                                                                          && $tblYear->getId() == $tblDivision->getServiceTblYear()
                                                                          && ($tblSubject = $tblDivisionSubject->getServiceTblSubject())
                                                                          && ($tblDivisionSubjectSelected->getServiceTblSubject())
                                          Severity: Major
                                          Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                            if ($now > $taskFromDate
                                                                                && $now < ($taskToDate->add(new \DateInterval('P1D')))
                                                                            ) {
                                                                                $countGrades = 0;
                                                                                if (($tblGradeList = Gradebook::useService()->getProposalBehaviorGradeAllBy($tblDivisionItem, $tblTask))) {
                                            Severity: Major
                                            Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                                  if ($tblDivision) {
                                                                                      $behaviorTaskAddList[] = array(
                                                                                          'tblTask' => $tblTask,
                                                                                          'tblDivision' => $tblDivision,
                                                                                          'tblGradeType' => $tblGradeType
                                              Severity: Major
                                              Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                                if ($tblPersonListMain) {
                                                                                    foreach ($tblPersonListMain as $tblPerson) {
                                                                                        $TeacherAcronym = new ToolTip(new Small(new NotAvailable())
                                                                                            ,
                                                                                            'Lehrer ' . $tblPerson->getLastFirstName() . ' besitzt kein Lehrerkürzel');
                                                Severity: Major
                                                Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                                  if (($tblSubjectStudent->getServiceTblPerson())) {
                                                                                      $countPersons++;
                                                                                  }
                                                  Severity: Major
                                                  Found in Application/Education/Graduation/Evaluation/Service.php - About 45 mins to fix

                                                    Consider simplifying this complex logical expression.
                                                    Open

                                                                                if (($tblDivision = $tblDivisionSubject->getTblDivision())
                                                                                    && $tblDivision->getServiceTblYear()
                                                                                    && $tblYear->getId() == $tblDivision->getServiceTblYear()
                                                                                    && ($tblSubject = $tblDivisionSubject->getServiceTblSubject())
                                                                                    && ($tblDivisionSubjectSelected->getServiceTblSubject())
                                                    Severity: Major
                                                    Found in Application/Education/Graduation/Evaluation/Service.php - About 40 mins to fix

                                                      Consider simplifying this complex logical expression.
                                                      Open

                                                                      if (($tblTask = $tblTest->getTblTask())
                                                                          && $tblTask->getFromDate()
                                                                          && $tblTask->getToDate()
                                                                          && ($fromDate = new \DateTime($tblTask->getFromDate()))
                                                                          && $now < $fromDate
                                                      Severity: Major
                                                      Found in Application/Education/Graduation/Evaluation/Service.php - About 40 mins to fix

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

                                                                TblDivision $tblDivision,
                                                                TblSubject $tblSubject,
                                                                TblSubjectGroup $tblSubjectGroup = null,
                                                                TblTestType $tblTestType,
                                                                $taskList
                                                        Severity: Minor
                                                        Found in Application/Education/Graduation/Evaluation/Service.php - About 35 mins to fix

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

                                                                  TblDivision $tblDivision,
                                                                  TblSubject $tblSubject,
                                                                  TblSubjectGroup $tblSubjectGroup = null,
                                                                  TblTestType $tblTestType,
                                                                  $taskList
                                                          Severity: Minor
                                                          Found in Application/Education/Graduation/Evaluation/Service.php - About 35 mins to fix

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

                                                                    TblTask $tblTask,
                                                                    TblDivision $tblDivision,
                                                                    TblSubject $tblSubject,
                                                                    TblGradeType $tblGradeType,
                                                                    TblSubjectGroup $tblSubjectGroup = null
                                                            Severity: Minor
                                                            Found in Application/Education/Graduation/Evaluation/Service.php - About 35 mins to fix

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

                                                                      TblDivision $tblDivision,
                                                                      TblSubject $tblSubject,
                                                                      TblTestType $tblTestType = null,
                                                                      TblPeriod $tblPeriod = null,
                                                                      TblSubjectGroup $tblSubjectGroup = null
                                                              Severity: Minor
                                                              Found in Application/Education/Graduation/Evaluation/Service.php - About 35 mins to fix

                                                                Function getHighlightedTestList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open

                                                                    public function getHighlightedTestList(
                                                                        TblDivision $tblDivision,
                                                                        TblSubject $tblSubject,
                                                                        TblPeriod $tblPeriod
                                                                    ) {
                                                                Severity: Minor
                                                                Found in Application/Education/Graduation/Evaluation/Service.php - About 35 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

                                                                Function setFutureTaskList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open

                                                                    private function setFutureTaskList(
                                                                        TblDivision $tblDivision,
                                                                        TblSubject $tblSubject,
                                                                        TblSubjectGroup $tblSubjectGroup = null,
                                                                        TblTestType $tblTestType,
                                                                Severity: Minor
                                                                Found in Application/Education/Graduation/Evaluation/Service.php - About 35 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 too many return statements within this method.
                                                                Open

                                                                        return new Success('Die Leistungsüberprüfung ist angelegt worden',
                                                                                new \SPHERE\Common\Frontend\Icon\Repository\Success())
                                                                            . new Redirect($BasicRoute . '/Selected', Redirect::TIMEOUT_SUCCESS,
                                                                                array('DivisionSubjectId' => $tblDivisionSubject->getId()));
                                                                Severity: Major
                                                                Found in Application/Education/Graduation/Evaluation/Service.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                              return new Danger(new Ban() . ' Fach nicht gefunden')
                                                                                  . new Redirect($BasicRoute . '/Selected', Redirect::TIMEOUT_ERROR,
                                                                                      array('DivisionSubjectId' => $tblDivisionSubject->getId()));
                                                                  Severity: Major
                                                                  Found in Application/Education/Graduation/Evaluation/Service.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                return new Danger(new Ban() . ' Zensuren-Typ nicht gefunden')
                                                                                    . new Redirect($BasicRoute . '/Selected', Redirect::TIMEOUT_ERROR,
                                                                                        array('DivisionSubjectId' => $tblDivisionSubject->getId()));
                                                                    Severity: Major
                                                                    Found in Application/Education/Graduation/Evaluation/Service.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                              return new Success('Test erfolgreich geändert.', new \SPHERE\Common\Frontend\Icon\Repository\Success()) .
                                                                                  new Redirect($BasicRoute . '/Selected', Redirect::TIMEOUT_SUCCESS,
                                                                                      array('DivisionSubjectId' => $tblDivisionSubject->getId()));
                                                                      Severity: Major
                                                                      Found in Application/Education/Graduation/Evaluation/Service.php - About 30 mins to fix

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

                                                                            public function getDivisionAllByTask(TblTask $tblTask)
                                                                            {
                                                                        
                                                                                $resultList = array();
                                                                                $tblTestList = $this->getTestAllByTask($tblTask);
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Evaluation/Service.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

                                                                                            $tblTestAdd = (new Data($this->getBinding()))->createTest(
                                                                                                $tblDivisionSubjectToLink->getTblDivision(),
                                                                                                $tblDivisionSubjectToLink->getServiceTblSubject(),
                                                                                                $tblDivisionSubjectToLink->getTblSubjectGroup() ? $tblDivisionSubjectToLink->getTblSubjectGroup() : null,
                                                                                                $tblPeriodLink,
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 4 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 234..248

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

                                                                        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

                                                                                $tblTest = (new Data($this->getBinding()))->createTest(
                                                                                    $tblDivisionSubject->getTblDivision(),
                                                                                    $tblDivisionSubject->getServiceTblSubject(),
                                                                                    $tblDivisionSubject->getTblSubjectGroup() ? $tblDivisionSubject->getTblSubjectGroup() : null,
                                                                                    $tblPeriod,
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 4 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 292..306

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

                                                                        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 (isset($Task['ToDate']) && empty($Task['ToDate'])) {
                                                                                    $Stage->setError('Task[ToDate]', 'Bitte geben Sie ein Datum an');
                                                                                    $Error = true;
                                                                                } else {
                                                                                    $nowDate = (new \DateTime('now'))->format("Y-m-d");
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 554..569

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

                                                                        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 (isset($Task['ToDate']) && empty($Task['ToDate'])) {
                                                                                    $Stage->setError('Task[ToDate]', 'Bitte geben Sie ein Datum an');
                                                                                    $Error = true;
                                                                                } else {
                                                                                    $nowDate = (new \DateTime('now'))->format("Y-m-d");
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 474..489

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

                                                                        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 (isset($taskList[$tblTask->getId()][$tblDivision->getDisplayName() . $tblSubject->getAcronym()
                                                                                                    . ($tblSubjectGroup ? $tblSubjectGroup->getName() : '')]['CountGrades'])
                                                                                                ) {
                                                                                                    $taskList[$tblTask->getId()][$tblDivision->getDisplayName() . $tblSubject->getAcronym()
                                                                                                    . ($tblSubjectGroup ? $tblSubjectGroup->getName() : '')]['CountGrades'] += $countGrades;
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1450..1458

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

                                                                        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 (isset($taskList[$tblTask->getId()][$tblDivision->getDisplayName() . $tblSubject->getAcronym()
                                                                                                    . ($tblSubjectGroup ? $tblSubjectGroup->getName() : '')]['CountPersons'])
                                                                                                ) {
                                                                                                    $taskList[$tblTask->getId()][$tblDivision->getDisplayName() . $tblSubject->getAcronym()
                                                                                                    . ($tblSubjectGroup ? $tblSubjectGroup->getName() : '')]['CountPersons'] += $countPersons;
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1460..1468

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                            (new Data($this->getBinding()))->updateTest(
                                                                                                $tblTestItem,
                                                                                                $Test['Description'],
                                                                                                isset($Test['Date']) ? $Test['Date'] : null,
                                                                                                isset($Test['CorrectionDate']) ? $Test['CorrectionDate'] : null,
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 378..386

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    (new Data($this->getBinding()))->updateTest(
                                                                                        $tblTest,
                                                                                        $Test['Description'],
                                                                                        isset($Test['Date']) ? $Test['Date'] : null,
                                                                                        isset($Test['CorrectionDate']) ? $Test['CorrectionDate'] : null,
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 2 hrs to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 392..400

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

                                                                        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 ($tblDivisionSubjectTeacher) {
                                                                                                        // Teacher Group (if exist) else Teacher Subject
                                                                                                        $tblPersonList = Division::useService()->getTeacherAllByDivisionSubject($tblDivisionSubjectTeacher);
                                                                                                        if ($tblPersonList) {
                                                                                                            foreach ($tblPersonList as $tblPerson) {
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1753..1768

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

                                                                        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 ($tblDivisionSubjectMain) {
                                                                                                        // Teacher Subject (if Group exist)
                                                                                                        $tblPersonListMain = Division::useService()->getTeacherAllByDivisionSubject($tblDivisionSubjectMain);
                                                                                                        if ($tblPersonListMain) {
                                                                                                            foreach ($tblPersonListMain as $tblPerson) {
                                                                        Severity: Major
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 1 hr to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1737..1752

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

                                                                        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

                                                                                } else {
                                                                                    $LayoutRowList = array();
                                                                                    $LayoutRowCount = 0;
                                                                                    $LayoutRow = null;
                                                                                    /**
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 1 hr to fix
                                                                        Application/Document/Custom/Radebeul/Radebeul.php on lines 261..279

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

                                                                        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 ($tblDivisionSubject->getHasGrading()) {
                                                                                                $appointedDateTaskList = $this->setCurrentTaskList(
                                                                                                    $tblDivision,
                                                                                                    $tblSubject,
                                                                                                    ($tblSubjectGroup = $tblDivisionSubject->getTblSubjectGroup())
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 45 mins to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1211..1230

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

                                                                        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 ($tblDivisionSubject->getHasGrading() || (($tblSetting = Consumer::useService()->getSetting(
                                                                                                        'Education', 'Graduation', 'Evaluation', 'HasBehaviorGradesForSubjectsWithNoGrading'
                                                                                                    ))
                                                                                                    && $tblSetting->getValue())
                                                                                            ) {
                                                                        Severity: Minor
                                                                        Found in Application/Education/Graduation/Evaluation/Service.php and 1 other location - About 45 mins to fix
                                                                        Application/Education/Graduation/Evaluation/Service.php on lines 1195..1209

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

                                                                        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