DerDu/SPHERE-Framework

View on GitHub
Application/Education/Certificate/Prepare/Service.php

Summary

Maintainability
F
2 mos
Test Coverage

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

<?php
/**
 * Created by PhpStorm.
 * User: Kauschke
 * Date: 12.07.2016
Severity: Major
Found in Application/Education/Certificate/Prepare/Service.php - About 1 wk to fix

    Function createCertificateContent has a Cognitive Complexity of 434 (exceeds 5 allowed). Consider refactoring.
    Open

        private function createCertificateContent(
            TblPrepareCertificate $tblPrepare = null,
            TblLeaveStudent $tblLeaveStudent = null,
            TblPerson $tblPerson,
            $Content = array()
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Service.php - About 1 wk to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method createCertificateContent has 689 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function createCertificateContent(
            TblPrepareCertificate $tblPrepare = null,
            TblLeaveStudent $tblLeaveStudent = null,
            TblPerson $tblPerson,
            $Content = array()
    Severity: Major
    Found in Application/Education/Certificate/Prepare/Service.php - About 3 days to fix

      Function checkCertificateSubjectsForStudents has a Cognitive Complexity of 145 (exceeds 5 allowed). Consider refactoring.
      Open

          public function checkCertificateSubjectsForStudents(TblPrepareCertificate $tblPrepare)
          {
      
              $subjectList = array();
              $resultList = array();
      Severity: Minor
      Found in Application/Education/Certificate/Prepare/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

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

      class Service extends AbstractService
      {
      
          /**
           * @param bool $doSimulation
      Severity: Major
      Found in Application/Education/Certificate/Prepare/Service.php - About 1 day to fix

        Function updateAbiturPreliminaryGrades has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateAbiturPreliminaryGrades(
                IFormInterface $Form = null,
                TblPerson $tblPerson,
                TblPrepareCertificate $tblPrepare,
                $GroupId = null,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 updateAbiturExamGrades has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateAbiturExamGrades(
                IFormInterface $form,
                TblPrepareCertificate $tblPrepare,
                TblPerson $tblPerson,
                $Data,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 updatePrepareExamGrades has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updatePrepareExamGrades(
                IFormInterface $form,
                TblPrepareCertificate $tblPrepare,
                TblSubject $tblCurrentSubject,
                TblSubject $tblNextSubject = null,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 checkCertificateSubjectsForDivision has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
        Open

            public function checkCertificateSubjectsForDivision(TblPrepareCertificate $tblPrepare, $certificateNameList, &$hasMissingLanguage)
            {
        
                if (($tblSetting = ConsumerSetting::useService()->getSetting('Api', 'Education', 'Certificate', 'ProfileAcronym'))
                    && ($value = $tblSetting->getValue())
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 calcSubjectGradesAverageOthers has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
        Open

            private function calcSubjectGradesAverageOthers(TblPrepareStudent $tblPrepareStudent)
            {
        
                if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                    && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 copyAbiturPreliminaryGradesFromAppointedDateTask has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
        Open

            public function copyAbiturPreliminaryGradesFromAppointedDateTask(
                TblDivision $tblDivision,
                TblPerson $tblPerson,
                TblPrepareCertificate $tblPrepareCertificate,
                TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 calcSubjectGradesAverage has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
        Open

            private function calcSubjectGradesAverage(TblPrepareStudent $tblPrepareStudent)
            {
        
                if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                    && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 setAutoDroppedSubjects has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

            public function setAutoDroppedSubjects(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson)
            {
        
                $gradeString = '';
                $tblLastDivision = false;
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 7 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function getAutoDroppedSubjects has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getAutoDroppedSubjects(TblPerson $tblPerson, TblDivision $tblCurrentDivision)
            {
        
                $subjectList = array();
                $tblLastDivision = false;
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 7 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function updatePrepareInformationList has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updatePrepareInformationList(
                IFormInterface $Stage = null,
                TblPrepareCertificate $tblPrepare,
                TblGroup $tblGroup = null,
                $Route,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 7 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function getCoursesForStudent has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getCoursesForStudent(TblDivision $tblDivision, TblPerson $tblPerson)
            {
        
                $advancedCourses = array();
                $basicCourses = array();
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 6 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function updateLeaveContent has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateLeaveContent(
                IFormInterface $Form = null,
                TblPerson $tblPerson,
                TblDivision $tblDivision,
                TblCertificate $tblCertificate,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 6 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function updateLeaveStudentAbiturPoints has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateLeaveStudentAbiturPoints(
                IFormInterface $Form = null,
                TblLeaveStudent $tblLeaveStudent,
                $Data
            ) {
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Service.php - About 6 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

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

            public function updatePrepareBehaviorGrades(
                IFormInterface $Stage = null,
                TblPrepareCertificate $tblPrepare,
                TblGroup $tblGroup = null,
                TblGradeType $tblGradeType,
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 updateAbiturExamGrades has 128 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateAbiturExamGrades(
                IFormInterface $form,
                TblPrepareCertificate $tblPrepare,
                TblPerson $tblPerson,
                $Data,
        Severity: Major
        Found in Application/Education/Certificate/Prepare/Service.php - About 5 hrs to fix

          Function getResultForAbiturAverageGrade has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

              public function  getResultForAbiturAverageGrade(
                  $totalPoints
              ) {
          
                  // ist Formel korrekt?
          Severity: Minor
          Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              public function updateAbiturLevelTenGrades(
                  IFormInterface $form,
                  TblPrepareCertificate $tblPrepare,
                  TblPerson $tblPerson,
                  $Data,
          Severity: Minor
          Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method checkCertificateSubjectsForStudents has 115 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function checkCertificateSubjectsForStudents(TblPrepareCertificate $tblPrepare)
              {
          
                  $subjectList = array();
                  $resultList = array();
          Severity: Major
          Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

            Function updatePrepareSetSigner has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
            Open

                public function updatePrepareSetSigner(
                    IFormInterface $Stage,
                    TblPrepareCertificate $tblPrepare,
                    TblGroup $tblGroup = null,
                    $Data,
            Severity: Minor
            Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function getResultForAbiturBlockII has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getResultForAbiturBlockII(
                    TblPrepareCertificate $tblPrepareCertificate,
                    TblPerson $tblPerson
                ) {
            
            
            Severity: Minor
            Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                public function getCertificateMultiContent(TblPrepareCertificate $tblPrepare, TblGroup $tblGroup = null)
                {
            
                    $Content = array();
            
            
            Severity: Minor
            Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                public function updatePrepareExamGrades(
                    IFormInterface $form,
                    TblPrepareCertificate $tblPrepare,
                    TblSubject $tblCurrentSubject,
                    TblSubject $tblNextSubject = null,
            Severity: Major
            Found in Application/Education/Certificate/Prepare/Service.php - About 4 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                          if ($tblConsumer
                              && $tblConsumer->getAcronym() == 'EVSR'
                              && $isDivisionTeacherAvailable
                          ) {
                              $firstName = $tblPersonSigner->getFirstName();
              Severity: Critical
              Found in Application/Education/Certificate/Prepare/Service.php - About 3 hrs to fix

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

                    public function updateAbiturPreliminaryGrades(
                        IFormInterface $Form = null,
                        TblPerson $tblPerson,
                        TblPrepareCertificate $tblPrepare,
                        $GroupId = null,
                Severity: Major
                Found in Application/Education/Certificate/Prepare/Service.php - About 3 hrs to fix

                  Method setAutoDroppedSubjects has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function setAutoDroppedSubjects(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson)
                      {
                  
                          $gradeString = '';
                          $tblLastDivision = false;
                  Severity: Major
                  Found in Application/Education/Certificate/Prepare/Service.php - About 3 hrs to fix

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

                        public function getResultForAbiturBlockI(
                            TblPrepareCertificate $tblPrepare,
                            TblPerson $tblPerson
                        ) {
                            $countCourses = 0;
                    Severity: Minor
                    Found in Application/Education/Certificate/Prepare/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 updatePrepareInformationList has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function updatePrepareInformationList(
                            IFormInterface $Stage = null,
                            TblPrepareCertificate $tblPrepare,
                            TblGroup $tblGroup = null,
                            $Route,
                    Severity: Major
                    Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                          public function copyAbiturPreliminaryGradesFromCertificates(
                              TblPrepareStudent $tblPrepareStudent,
                              TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                              TblPrepareCertificate $tblPrepareCertificate
                          ) {
                      Severity: Minor
                      Found in Application/Education/Certificate/Prepare/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 updateAbiturLevelTenGrades has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function updateAbiturLevelTenGrades(
                              IFormInterface $form,
                              TblPrepareCertificate $tblPrepare,
                              TblPerson $tblPerson,
                              $Data,
                      Severity: Major
                      Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                        Method getAutoDroppedSubjects has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getAutoDroppedSubjects(TblPerson $tblPerson, TblDivision $tblCurrentDivision)
                            {
                        
                                $subjectList = array();
                                $tblLastDivision = false;
                        Severity: Major
                        Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                          Method updatePrepareBehaviorGrades has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function updatePrepareBehaviorGrades(
                                  IFormInterface $Stage = null,
                                  TblPrepareCertificate $tblPrepare,
                                  TblGroup $tblGroup = null,
                                  TblGradeType $tblGradeType,
                          Severity: Major
                          Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                            Method getResultForAbiturBlockII has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getResultForAbiturBlockII(
                                    TblPrepareCertificate $tblPrepareCertificate,
                                    TblPerson $tblPerson
                                ) {
                            
                            
                            Severity: Major
                            Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                              Method getResultForAbiturAverageGrade has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function  getResultForAbiturAverageGrade(
                                      $totalPoints
                                  ) {
                              
                                      // ist Formel korrekt?
                              Severity: Major
                              Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                                    public function checkAbiturExams(TblPrepareCertificate $tblPrepareCertificate, TblPerson $tblPerson)
                                    {
                                
                                        $warnings = false;
                                        $exams = array();
                                Severity: Minor
                                Found in Application/Education/Certificate/Prepare/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 setYearGroupButtonList has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
                                    {
                                
                                        $tblYear = false;
                                        $tblYearList = Term::useService()->getYearByNow();
                                Severity: Minor
                                Found in Application/Education/Certificate/Prepare/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 checkCertificateSubjectsForDivision has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function checkCertificateSubjectsForDivision(TblPrepareCertificate $tblPrepare, $certificateNameList, &$hasMissingLanguage)
                                    {
                                
                                        if (($tblSetting = ConsumerSetting::useService()->getSetting('Api', 'Education', 'Certificate', 'ProfileAcronym'))
                                            && ($value = $tblSetting->getValue())
                                Severity: Major
                                Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                                      public function updateLeaveStudentAbiturPoints(
                                          IFormInterface $Form = null,
                                          TblLeaveStudent $tblLeaveStudent,
                                          $Data
                                      ) {
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                                    Method updateAbiturPrepareInformation has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function updateAbiturPrepareInformation(
                                            IFormInterface $form,
                                            TblPrepareCertificate $tblPrepare,
                                            TblPerson $tblPerson,
                                            $Data,
                                    Severity: Major
                                    Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                                          public function updateAbiturPrepareInformation(
                                              IFormInterface $form,
                                              TblPrepareCertificate $tblPrepare,
                                              TblPerson $tblPerson,
                                              $Data,
                                      Severity: Minor
                                      Found in Application/Education/Certificate/Prepare/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 calcSubjectGradesAverageOthers has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function calcSubjectGradesAverageOthers(TblPrepareStudent $tblPrepareStudent)
                                          {
                                      
                                              if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                  && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
                                      Severity: Major
                                      Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                                            public function copyAbiturLeaveGradesFromCertificates(
                                                TblPrepareStudent $tblPrepareStudent,
                                                TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                TblLeaveStudent $tblLeaveStudent
                                            ) {
                                        Severity: Minor
                                        Found in Application/Education/Certificate/Prepare/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 getAbiturLeaveGradeBySubject has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            public function getAbiturLeaveGradeBySubject($points)
                                            {
                                        
                                                if ($points === '15') {
                                                    return '1+';
                                        Severity: Minor
                                        Found in Application/Education/Certificate/Prepare/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 updateLeaveContent has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function updateLeaveContent(
                                                IFormInterface $Form = null,
                                                TblPerson $tblPerson,
                                                TblDivision $tblDivision,
                                                TblCertificate $tblCertificate,
                                        Severity: Major
                                        Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

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

                                              public function updatePrepareSetSigner(
                                                  IFormInterface $Stage,
                                                  TblPrepareCertificate $tblPrepare,
                                                  TblGroup $tblGroup = null,
                                                  $Data,
                                          Severity: Minor
                                          Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                            Function getGenderByPerson has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                private function getGenderByPerson(TblPerson $tblPerson)
                                                {
                                            
                                                    $return = false;
                                                    if (($tblCommonTeacher = $tblPerson->getCommon())) {
                                            Severity: Minor
                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                                public function createPrepareAdditionalGradeForm(
                                                    IFormInterface $Form,
                                                    $Data,
                                                    TblPrepareCertificate $tblPrepareCertificate,
                                                    TblGroup $tblGroup = null,
                                            Severity: Minor
                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                              Method calcSubjectGradesAverage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  private function calcSubjectGradesAverage(TblPrepareStudent $tblPrepareStudent)
                                                  {
                                              
                                                      if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                          && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
                                              Severity: Minor
                                              Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                Method copyAbiturPreliminaryGradesFromAppointedDateTask has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    public function copyAbiturPreliminaryGradesFromAppointedDateTask(
                                                        TblDivision $tblDivision,
                                                        TblPerson $tblPerson,
                                                        TblPrepareCertificate $tblPrepareCertificate,
                                                        TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                Severity: Minor
                                                Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                                              if (($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
                                                                                  && $tblCertificateType->getIdentifier() == 'DIPLOMA'
                                                                                  && ($tblSetting = ConsumerSetting::useService()->getSetting(
                                                                                      'Education', 'Certificate', 'Prepare', 'IsGradeVerbalOnDiploma'))
                                                                                  && $tblSetting->getValue()
                                                  Severity: Critical
                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                    Method checkAbiturExams has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        public function checkAbiturExams(TblPrepareCertificate $tblPrepareCertificate, TblPerson $tblPerson)
                                                        {
                                                    
                                                            $warnings = false;
                                                            $exams = array();
                                                    Severity: Minor
                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                      Function updatePrepareInformationDataList has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          public function updatePrepareInformationDataList(
                                                              TblPrepareCertificate $tblPrepare,
                                                              TblPerson $tblPerson,
                                                              $Content,
                                                              Certificate $Certificate = null
                                                      Severity: Minor
                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                      Cognitive Complexity

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

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

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

                                                      Further reading

                                                      Function calcAbiturLeaveGradePointsBySubject has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          public function calcAbiturLeaveGradePointsBySubject(TblLeaveStudent $tblLeaveStudent, TblSubject $tblSubject)
                                                          {
                                                      
                                                              $sum = 0;
                                                              $count = 0;
                                                      Severity: Minor
                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                      Cognitive Complexity

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

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

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

                                                      Further reading

                                                      Method setYearGroupButtonList has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

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

                                                        Method updateAbiturLeaveInformation has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            public function updateAbiturLeaveInformation(
                                                                IFormInterface $form = null,
                                                                TblLeaveStudent $tblLeaveStudent,
                                                                $Data
                                                            ) {
                                                        Severity: Minor
                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                          Method getResultForAbiturBlockI has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              public function getResultForAbiturBlockI(
                                                                  TblPrepareCertificate $tblPrepare,
                                                                  TblPerson $tblPerson
                                                              ) {
                                                                  $countCourses = 0;
                                                          Severity: Minor
                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                            Function createPrepareAdditionalGradeForm has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                                public function createPrepareAdditionalGradeForm(
                                                                    IFormInterface $Form,
                                                                    $Data,
                                                                    TblPrepareCertificate $tblPrepareCertificate,
                                                                    TblGroup $tblGroup = null,
                                                            Severity: Minor
                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                            Cognitive Complexity

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

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

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

                                                            Further reading

                                                            Function updateAbiturLeaveInformation has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                                public function updateAbiturLeaveInformation(
                                                                    IFormInterface $form = null,
                                                                    TblLeaveStudent $tblLeaveStudent,
                                                                    $Data
                                                                ) {
                                                            Severity: Minor
                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                            Cognitive Complexity

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

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

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

                                                            Further reading

                                                            Method getAbiturLeaveGradeBySubject has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                public function getAbiturLeaveGradeBySubject($points)
                                                                {
                                                            
                                                                    if ($points === '15') {
                                                                        return '1+';
                                                            Severity: Minor
                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                              Method copyAbiturPreliminaryGradesFromCertificates has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  public function copyAbiturPreliminaryGradesFromCertificates(
                                                                      TblPrepareStudent $tblPrepareStudent,
                                                                      TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                                      TblPrepareCertificate $tblPrepareCertificate
                                                                  ) {
                                                              Severity: Minor
                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                Method copyAbiturLeaveGradesFromCertificates has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    public function copyAbiturLeaveGradesFromCertificates(
                                                                        TblPrepareStudent $tblPrepareStudent,
                                                                        TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                                        TblLeaveStudent $tblLeaveStudent
                                                                    ) {
                                                                Severity: Minor
                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                  Consider simplifying this complex logical expression.
                                                                  Open

                                                                              if ($tblPrepare
                                                                                  && ($tblAppointedDateTask = $tblPrepare->getServiceTblAppointedDateTask())
                                                                                  && $tblYear
                                                                                  && ($tblPeriodList = $tblYear->getTblPeriodAll($tblLevel && $tblLevel->getName() == '12'))
                                                                                  && ($tblPeriod = $tblAppointedDateTask->getServiceTblPeriodByDivision($tblDivision))
                                                                  Severity: Critical
                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                    Method getCoursesForStudent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        public function getCoursesForStudent(TblDivision $tblDivision, TblPerson $tblPerson)
                                                                        {
                                                                    
                                                                            $advancedCourses = array();
                                                                            $basicCourses = array();
                                                                    Severity: Minor
                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                      Method getCertificateMultiContent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          public function getCertificateMultiContent(TblPrepareCertificate $tblPrepare, TblGroup $tblGroup = null)
                                                                          {
                                                                      
                                                                              $Content = array();
                                                                      
                                                                      
                                                                      Severity: Minor
                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                        Consider simplifying this complex logical expression.
                                                                        Open

                                                                                                if (($tblConsumer = Consumer::useService()->getConsumerBySession())
                                                                                                    && $tblConsumer->getAcronym() == 'EVSR'
                                                                                                    && $tblGenerateCertificate
                                                                                                    && ($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
                                                                                                    && $tblCertificateType->getIdentifier() != 'RECOMMENDATION'
                                                                        Severity: Major
                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                          Method updatePrepareExamGrades has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                                  IFormInterface $form,
                                                                                  TblPrepareCertificate $tblPrepare,
                                                                                  TblSubject $tblCurrentSubject,
                                                                                  TblSubject $tblNextSubject = null,
                                                                                  $IsFinalGrade = null,
                                                                          Severity: Major
                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

                                                                            Method createPrepareAdditionalGrade has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                    TblPrepareCertificate $tblPrepareCertificate,
                                                                                    TblPerson $tblPerson,
                                                                                    TblSubject $tblSubject,
                                                                                    TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                                                    $ranking,
                                                                            Severity: Major
                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 1 hr to fix

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

                                                                                  private function setSignerFromSignedInPerson(TblPrepareStudent $tblPrepareStudent)
                                                                                  {
                                                                              
                                                                                      if (!$tblPrepareStudent->getServiceTblPersonSigner()
                                                                                          && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
                                                                              Severity: Minor
                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 55 mins to fix

                                                                              Cognitive Complexity

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

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

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

                                                                              Further reading

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

                                                                                      TblDivision $tblDivision,
                                                                                      $Date,
                                                                                      $Name,
                                                                                      $IsGradeInformation = false,
                                                                                      TblGenerateCertificate $tblGenerateCertificate = null,
                                                                              Severity: Major
                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 50 mins to fix

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

                                                                                        IFormInterface $form,
                                                                                        TblPrepareCertificate $tblPrepare,
                                                                                        TblPerson $tblPerson,
                                                                                        $Data,
                                                                                        $GroupId,
                                                                                Severity: Major
                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 50 mins to fix

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

                                                                                          IFormInterface $Stage = null,
                                                                                          TblPrepareCertificate $tblPrepare,
                                                                                          TblGroup $tblGroup = null,
                                                                                          TblGradeType $tblGradeType,
                                                                                          TblGradeType $tblNextGradeType = null,
                                                                                  Severity: Major
                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 50 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                                    if ($tblGrade->getGrade() !== null && $tblGrade->getGrade() !== '') {
                                                                                                                        if ($tblSubject->getAcronym() == 'EN2') {
                                                                                                                            $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                                                                                                        }
                                                                                    
                                                                                    
                                                                                    Severity: Major
                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                              TblPrepareCertificate $tblPrepare,
                                                                                              $Date,
                                                                                              $Name,
                                                                                              TblTask $tblAppointedDateTask = null,
                                                                                              TblTask $tblBehaviorTask = null,
                                                                                      Severity: Minor
                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                                IFormInterface $Form,
                                                                                                $Data,
                                                                                                TblPrepareCertificate $tblPrepareCertificate,
                                                                                                TblGroup $tblGroup = null,
                                                                                                TblPerson $tblPerson,
                                                                                        Severity: Minor
                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                          if ($tblSubject->getAcronym() == 'EN2') {
                                                                                                                              $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                                                                                                          }
                                                                                          Severity: Major
                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                                    IFormInterface $Form = null,
                                                                                                    TblPerson $tblPerson,
                                                                                                    TblPrepareCertificate $tblPrepare,
                                                                                                    $GroupId = null,
                                                                                                    $View = null,
                                                                                            Severity: Minor
                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                          if (!$tblCertificateSubject
                                                                                                                              && $tblPrepareGrade && $tblPrepareGrade->getGrade() != ''
                                                                                                                          ) {
                                                                                                                              $grade = str_replace('+', '', $tblPrepareGrade->getGrade());
                                                                                                                              $grade = str_replace('-', '', $grade);
                                                                                              Severity: Major
                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                            if ($tblTestList) {
                                                                                                                                foreach ($tblTestList as $tblTest) {
                                                                                                                                    $tblPrepareGrade = Gradebook::useService()->getGradeByTestAndStudent($tblTest,
                                                                                                                                        $tblPerson);
                                                                                                                                    if ($tblPrepareGrade) {
                                                                                                Severity: Major
                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                                      public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
                                                                                                  Severity: Minor
                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                                if (is_numeric($grade)) {
                                                                                                                                    $gradeList[] = $grade;
                                                                                                                                }
                                                                                                    Severity: Major
                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                                              IFormInterface $Stage = null,
                                                                                                              TblPrepareCertificate $tblPrepare,
                                                                                                              TblGroup $tblGroup = null,
                                                                                                              $Route,
                                                                                                              $Data,
                                                                                                      Severity: Minor
                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                                        if ($tblSubject) {
                                                                                                                                            if ($tblSubjectGroup->isAdvancedCourse()) {
                                                                                                                                                $advancedCourses[$tblSubject->getId()] = $tblSubject;
                                                                                                                                            } else {
                                                                                                                                                $basicCourses[$tblSubject->getId()] = $tblSubject;
                                                                                                        Severity: Major
                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                                                                                                  TblPrepareCertificate $tblPrepare,
                                                                                                                  TblPerson $tblPerson,
                                                                                                                  TblDivision $tblDivision,
                                                                                                                  TblTestType $tblTestType,
                                                                                                                  TblGradeType $tblGradeType,
                                                                                                          Severity: Minor
                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                                        if (($tblSubject = $tblPrepareAdditionalGrade->getServiceTblSubject())) {
                                                                                                                                            if (isset($Data[$midTerm][$tblSubject->getId()])) {
                                                                                                                                                if (!$tblPrepareAdditionalGrade->isSelected()) {
                                                                                                                                                    (new Data($this->getBinding()))->updatePrepareAdditionalGrade(
                                                                                                                                                        $tblPrepareAdditionalGrade, $tblPrepareAdditionalGrade->getGrade(), true);
                                                                                                            Severity: Major
                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                              Avoid deeply nested control flow statements.
                                                                                                              Open

                                                                                                                                      if ($tblCourse->getName() == 'Hauptschule') {
                                                                                                                                          $Content['P' . $personId]['Student']['Course']['Degree'] = 'Hauptschulabschlusses';
                                                                                                                                          $Content['P' . $personId]['Student']['Course']['Name'] = 'Hauptschulbildungsgang';
                                                                                                                                      } elseif ($tblCourse->getName() == 'Realschule') {
                                                                                                                                          $Content['P' . $personId]['Student']['Course']['Degree'] = 'Realschulabschlusses';
                                                                                                              Severity: Major
                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                                            if (!$tblCertificateSubject
                                                                                                                                                && $tblGrade && $tblGrade->getGrade() != ''
                                                                                                                                            ) {
                                                                                                                                                $grade = str_replace('+', '', $tblGrade->getGrade());
                                                                                                                                                $grade = str_replace('-', '', $grade);
                                                                                                                Severity: Major
                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                  Open

                                                                                                                          if ($tblLastDivision
                                                                                                                              && $tblCurrentDivision
                                                                                                                              && ($tblLastYear = $tblLastDivision->getServiceTblYear())
                                                                                                                              && ($tblCurrentYear = $tblCurrentDivision->getServiceTblYear())
                                                                                                                              && ($tblLastDivisionSubjectList = Division::useService()->getDivisionSubjectAllByPersonAndYear($tblPerson,
                                                                                                                  Severity: Major
                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 40 mins to fix

                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                    Open

                                                                                                                                                    if (($tblConsumer = Consumer::useService()->getConsumerBySession())
                                                                                                                                                        && $tblConsumer->getAcronym() == 'EVSR'
                                                                                                                                                        && ($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
                                                                                                                                                        && $tblCertificateType->getIdentifier() != 'RECOMMENDATION'
                                                                                                                                                        && ($tblSetting = ConsumerSetting::useService()->getSetting(
                                                                                                                    Severity: Major
                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 40 mins to fix

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

                                                                                                                              IFormInterface $Form = null,
                                                                                                                              TblPerson $tblPerson,
                                                                                                                              TblDivision $tblDivision,
                                                                                                                              TblCertificate $tblCertificate,
                                                                                                                              $Data
                                                                                                                      Severity: Minor
                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                TblPrepareCertificate $tblPrepare,
                                                                                                                                TblPerson $tblPerson,
                                                                                                                                TblDivision $tblDivision,
                                                                                                                                TblSubject $tblSubject,
                                                                                                                                TblTestType $tblTestType
                                                                                                                        Severity: Minor
                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                  TblPerson $tblPerson,
                                                                                                                                  TblDivision $tblDivision,
                                                                                                                                  TblCertificate $tblCertificate,
                                                                                                                                  $IsApproved = false,
                                                                                                                                  $IsPrinted = false
                                                                                                                          Severity: Minor
                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                    IFormInterface $Stage,
                                                                                                                                    TblPrepareCertificate $tblPrepare,
                                                                                                                                    TblGroup $tblGroup = null,
                                                                                                                                    $Data,
                                                                                                                                    $Route
                                                                                                                            Severity: Minor
                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                      IFormInterface $form,
                                                                                                                                      TblPrepareCertificate $tblPrepare,
                                                                                                                                      TblPerson $tblPerson,
                                                                                                                                      $Data,
                                                                                                                                      $GroupId
                                                                                                                              Severity: Minor
                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                        TblPrepareCertificate $tblPrepare,
                                                                                                                                        TblPerson $tblPerson,
                                                                                                                                        TblDivision $tblDivision,
                                                                                                                                        TblTestType $tblTestType,
                                                                                                                                        TblGradeType $tblGradeType
                                                                                                                                Severity: Minor
                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                          IFormInterface $form,
                                                                                                                                          TblPrepareCertificate $tblPrepare,
                                                                                                                                          TblPerson $tblPerson,
                                                                                                                                          $Data,
                                                                                                                                          $GroupId
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                            TblDivision $tblDivision,
                                                                                                                                            TblPerson $tblPerson,
                                                                                                                                            TblPrepareCertificate $tblPrepareCertificate,
                                                                                                                                            TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                                                                                                                            TblTestType $tblTestType
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 35 mins to fix

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

                                                                                                                                          public function getPrepareAllByYear(TblYear $tblYear)
                                                                                                                                          {
                                                                                                                                      
                                                                                                                                              $resultList = array();
                                                                                                                                              $entityList = $this->getPrepareAll();
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Application/Education/Certificate/Prepare/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 getVerbalGrade has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          private function getVerbalGrade($grade)
                                                                                                                                          {
                                                                                                                                              switch ($grade) {
                                                                                                                                                  case 1 : return 'sehr gut'; break;
                                                                                                                                                  case 2 : return 'gut'; break;
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Application/Education/Certificate/Prepare/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

                                                                                                                                                  case 5 : return 'mangelhaft'; break;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                    return '2,6';
                                                                                                                                        Severity: Major
                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                      return '2,3';
                                                                                                                                          Severity: Major
                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                    return $grade;
                                                                                                                                            Severity: Major
                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                              Open

                                                                                                                                                          return '2,2';
                                                                                                                                              Severity: Major
                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                Open

                                                                                                                                                            return '2,5';
                                                                                                                                                Severity: Major
                                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                  Open

                                                                                                                                                              return '1,7';
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                    Open

                                                                                                                                                                return '2,0';
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                      Open

                                                                                                                                                                  case 6 : return 'ungenügend'; break;
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                        Open

                                                                                                                                                                    return '1,6';
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                          Open

                                                                                                                                                                      return '2,1';
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                            Open

                                                                                                                                                                        return '1,5';
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                              Open

                                                                                                                                                                          return '1,4';
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                Open

                                                                                                                                                                            return '1,8';
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                  Open

                                                                                                                                                                              return '1,9';
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                    Open

                                                                                                                                                                                return '2,4';
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                      Open

                                                                                                                                                                                  return '4';
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                        Open

                                                                                                                                                                                    return '2,8';
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                          Open

                                                                                                                                                                                      return '4+';
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                            Open

                                                                                                                                                                                        return '5-';
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                              Open

                                                                                                                                                                                          return '3,6';
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                Open

                                                                                                                                                                                            return '3,4';
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                  Open

                                                                                                                                                                                              return '3';
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                    Open

                                                                                                                                                                                                return '&ndash;';
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                  return '3,9';
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    return '3,1';
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                          Open

                                                                                                                                                                                                      return '3,5';
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                            Open

                                                                                                                                                                                                        return '&nbsp;';
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                              Open

                                                                                                                                                                                                          return '4-';
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                Open

                                                                                                                                                                                                            return '5';
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                              return '3,0';
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                return '2,9';
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  return '3,2';
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                    return '3,7';
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                      return '3,8';
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                        return '2-';
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                          return '3-';
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                            return '3,3';
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                              return '3+';
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                return '6';
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                  return '2,7';
                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                      Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                    return '4,0';
                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                        Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                      return '2';
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                        return '5+';
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in Application/Education/Certificate/Prepare/Service.php - About 30 mins to fix

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

                                                                                                                                                                                                                                  public function calcAbiturExamGradesTotalForVerbalExam(
                                                                                                                                                                                                                                      TblPrepareAdditionalGrade $tblVerbalExamGrade,
                                                                                                                                                                                                                                      TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
                                                                                                                                                                                                                                  ) {
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

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

                                                                                                                                                                                                                                  public function calcAbiturExamGradesTotalForWrittenExam(
                                                                                                                                                                                                                                      TblPrepareAdditionalGrade $tblWrittenExamGrade,
                                                                                                                                                                                                                                      TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
                                                                                                                                                                                                                                  ) {
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

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

                                                                                                                                                                                                                                  public function getCertificateMultiLeaveContent(TblDivision $tblDivision) {
                                                                                                                                                                                                                                      $Content = array();
                                                                                                                                                                                                                              
                                                                                                                                                                                                                                      if (($tblLeaveStudentList = $this->getLeaveStudentAllByDivision($tblDivision))) {
                                                                                                                                                                                                                                          foreach ($tblLeaveStudentList as $tblLeaveStudent) {
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

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

                                                                                                                                                                                                                                  public function updatePrepareStudentSetApproved(TblPrepareStudent $tblPrepareStudent)
                                                                                                                                                                                                                                  {
                                                                                                                                                                                                                              
                                                                                                                                                                                                                                      if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                                                                                                                                                                                                          && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

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

                                                                                                                                                                                                                                  public function updatePrepareDivisionSetApproved(TblPrepareCertificate $tblPrepare)
                                                                                                                                                                                                                                  {
                                                                                                                                                                                                                              
                                                                                                                                                                                                                                      if (($tblDivision = $tblPrepare->getServiceTblDivision())) {
                                                                                                                                                                                                                                          if (($tblGenerateCertificate = $tblPrepare->getServiceTblGenerateCertificate())
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

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

                                                                                                                                                                                                                                  public function createLeaveStudentFromForm(
                                                                                                                                                                                                                                      IFormInterface $form = null,
                                                                                                                                                                                                                                      TblPerson $tblPerson,
                                                                                                                                                                                                                                      TblDivision $tblDivision,
                                                                                                                                                                                                                                      $Data
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/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

                                                                                                                                                                                                                                          if (($tblAddress = $tblCompany->fetchMainAddress())) {
                                                                                                                                                                                                                                              $Content['P' . $personId]['Company']['Address']['Street']['Name'] = $tblAddress->getStreetName();
                                                                                                                                                                                                                                              $Content['P' . $personId]['Company']['Address']['Street']['Number'] = $tblAddress->getStreetNumber();
                                                                                                                                                                                                                                              $Content['P' . $personId]['Company']['Address']['City']['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                                                                                                                                              $Content['P' . $personId]['Company']['Address']['City']['Name'] = $tblAddress->getTblCity()->getDisplayName();
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 694..699

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

                                                                                                                                                                                                                              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 (($tblAddress = $tblPerson->fetchMainAddress())) {
                                                                                                                                                                                                                                          $Content['P' . $personId]['Person']['Address']['Street']['Name'] = $tblAddress->getStreetName();
                                                                                                                                                                                                                                          $Content['P' . $personId]['Person']['Address']['Street']['Number'] = $tblAddress->getStreetNumber();
                                                                                                                                                                                                                                          $Content['P' . $personId]['Person']['Address']['City']['Code'] = $tblAddress->getTblCity()->getCode();
                                                                                                                                                                                                                                          $Content['P' . $personId]['Person']['Address']['City']['Name'] = $tblAddress->getTblCity()->getDisplayName();
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 779..784

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

                                                                                                                                                                                                                              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 {
                                                                                                                                                                                                                                              if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('VERBAL_EXAM'))
                                                                                                                                                                                                                                                  && ($verbalExamGrade = Prepare::useService()->getPrepareAdditionalGradeByRanking(
                                                                                                                                                                                                                                                      $tblPrepareCertificate,
                                                                                                                                                                                                                                                      $tblPerson,
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3908..3958

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

                                                                                                                                                                                                                              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 ($i < 4) {
                                                                                                                                                                                                                                              if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('WRITTEN_EXAM'))
                                                                                                                                                                                                                                                  && ($writtenExamGrade = Prepare::useService()->getPrepareAdditionalGradeByRanking(
                                                                                                                                                                                                                                                      $tblPrepareCertificate,
                                                                                                                                                                                                                                                      $tblPerson,
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3933..3958

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

                                                                                                                                                                                                                              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 ($tblOrientationSubject) {
                                                                                                                                                                                                                                                          if ($tblOrientationSubject->getId() == $tblSubject->getId()) {
                                                                                                                                                                                                                                                              continue;
                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                      } elseif (($tblStudent = $tblPerson->getStudent())
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 2895..2913

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

                                                                                                                                                                                                                              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 ($tblProfileSubject) {
                                                                                                                                                                                                                                                          if ($tblProfileSubject->getId() == $tblSubject->getId()) {
                                                                                                                                                                                                                                                              continue;
                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                      } elseif (($tblStudent = $tblPerson->getStudent())
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 2916..2934

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

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

                                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                                              This issue has a mass of 123.

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                                  } elseif (!isset($Content['P' . $personId]['Person']['Parent']['Father']['Name'])) {
                                                                                                                                                                                                                                                      $Content['P' . $personId]['Person']['Parent']['Father']['Name']['First'] = $tblFromPerson->getFirstSecondName();
                                                                                                                                                                                                                                                      $Content['P' . $personId]['Person']['Parent']['Father']['Name']['Last'] = $tblFromPerson->getLastName();
                                                                                                                                                                                                                                                      $father = ($IsTitle ? $tblFromPerson->getTitle().' ' : '').
                                                                                                                                                                                                                                                          $tblFromPerson->getFirstSecondName().' '.$tblFromPerson->getLastName();
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 726..736

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

                                                                                                                                                                                                                              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($Content['P' . $personId]['Person']['Parent']['Mother']['Name'])) {
                                                                                                                                                                                                                                                      $Content['P' . $personId]['Person']['Parent']['Mother']['Name']['First'] = $tblFromPerson->getFirstSecondName();
                                                                                                                                                                                                                                                      $Content['P' . $personId]['Person']['Parent']['Mother']['Name']['Last'] = $tblFromPerson->getLastName();
                                                                                                                                                                                                                                                      $mother = ($IsTitle ? $tblFromPerson->getTitle().' ' : '').
                                                                                                                                                                                                                                                          $tblFromPerson->getFirstSecondName().' '.$tblFromPerson->getLastName();
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 731..736

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

                                                                                                                                                                                                                              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 ($field == 'SchoolType'
                                                                                                                                                                                                                                                  && method_exists($Certificate, 'selectValuesSchoolType')
                                                                                                                                                                                                                                              ) {
                                                                                                                                                                                                                                                  $value = $Certificate->selectValuesSchoolType()[$value];
                                                                                                                                                                                                                                              } elseif ($field == 'Type'
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 593..605

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

                                                                                                                                                                                                                              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 ($field == 'SchoolType'
                                                                                                                                                                                                                                                              && method_exists($Certificate, 'selectValuesSchoolType')
                                                                                                                                                                                                                                                          ) {
                                                                                                                                                                                                                                                              $value = $Certificate->selectValuesSchoolType()[$value];
                                                                                                                                                                                                                                                          } elseif ($field == 'Type'
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 1833..1845

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

                                                                                                                                                                                                                              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 (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('ADVANCED'))
                                                                                                                                                                                                                                              && ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
                                                                                                                                                                                                                                                  $tblStudentSubjectType))
                                                                                                                                                                                                                                          ) {
                                                                                                                                                                                                                                              /** @var TblStudentSubject $tblStudentSubject */
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 1336..1346

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

                                                                                                                                                                                                                              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 (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('ORIENTATION'))
                                                                                                                                                                                                                                              && ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
                                                                                                                                                                                                                                                  $tblStudentSubjectType))
                                                                                                                                                                                                                                          ) {
                                                                                                                                                                                                                                              /** @var TblStudentSubject $tblStudentSubject */
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 1324..1333

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

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

                                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                                              This issue has a mass of 102.

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      if (isset($Data['Remark'])) {
                                                                                                                                                                                                                                          if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'Remark'))) {
                                                                                                                                                                                                                                              (new Data($this->getBinding()))->updatePrepareInformation(
                                                                                                                                                                                                                                                  $tblPrepareInformation,
                                                                                                                                                                                                                                                  'Remark',
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 2 other locations - About 45 mins to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3694..3704
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3705..3715

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      if (isset($Data['BellPoints'])) {
                                                                                                                                                                                                                                          if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'BellPoints'))) {
                                                                                                                                                                                                                                              (new Data($this->getBinding()))->updatePrepareInformation(
                                                                                                                                                                                                                                                  $tblPrepareInformation,
                                                                                                                                                                                                                                                  'BellPoints',
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 2 other locations - About 45 mins to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3694..3704
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 4083..4093

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      if (isset($Data['BellSubject'])) {
                                                                                                                                                                                                                                          if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'BellSubject'))) {
                                                                                                                                                                                                                                              (new Data($this->getBinding()))->updatePrepareInformation(
                                                                                                                                                                                                                                                  $tblPrepareInformation,
                                                                                                                                                                                                                                                  'BellSubject',
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 2 other locations - About 45 mins to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3705..3715
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 4083..4093

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                          foreach ($Data as $midTerm => $subjects) {
                                                                                                                                                                                                                                              if (is_array($subjects)
                                                                                                                                                                                                                                                  && (($tblPrepareAdditionalGradeType = $this->getPrepareAdditionalGradeTypeByIdentifier($midTerm)))
                                                                                                                                                                                                                                              ) {
                                                                                                                                                                                                                                                  foreach ($subjects as $subjectId => $value) {
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 4362..4375

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

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

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

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

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

                                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      foreach ($Data as $midTerm => $subjects) {
                                                                                                                                                                                                                                          if (is_array($subjects)
                                                                                                                                                                                                                                              && (($tblPrepareAdditionalGradeType = $this->getPrepareAdditionalGradeTypeByIdentifier($midTerm)))
                                                                                                                                                                                                                                          ) {
                                                                                                                                                                                                                                              foreach ($subjects as $subjectId => $value) {
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in Application/Education/Certificate/Prepare/Service.php and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                              Application/Education/Certificate/Prepare/Service.php on lines 3301..3314

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

                                                                                                                                                                                                                              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