DerDu/SPHERE-Framework

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

Summary

Maintainability
F
2 wks
Test Coverage

File Data.php has 1157 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/Data.php - About 2 days to fix

    Function copySubjectGradesByPrepare has a Cognitive Complexity of 134 (exceeds 5 allowed). Consider refactoring.
    Open

        public function copySubjectGradesByPrepare(TblPrepareCertificate $tblPrepare, $isDiploma = false)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
    
    
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Service/Data.php - About 2 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function copySubjectGradesByPerson has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
    Open

        public function copySubjectGradesByPerson(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson, $isDiploma = false)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
    
    
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Service/Data.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

    Data has 61 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Data extends AbstractData
    {
    
        public function setupDatabaseContent()
        {
    Severity: Major
    Found in Application/Education/Certificate/Prepare/Service/Data.php - About 1 day to fix

      Method copySubjectGradesByPrepare has 136 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function copySubjectGradesByPrepare(TblPrepareCertificate $tblPrepare, $isDiploma = false)
          {
      
              $Manager = $this->getConnection()->getEntityManager();
      
      
      Severity: Major
      Found in Application/Education/Certificate/Prepare/Service/Data.php - About 5 hrs to fix

        Method copySubjectGradesByPerson has 100 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function copySubjectGradesByPerson(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson, $isDiploma = false)
            {
        
                $Manager = $this->getConnection()->getEntityManager();
        
        
        Severity: Major
        Found in Application/Education/Certificate/Prepare/Service/Data.php - About 4 hrs to fix

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

              public function createPrepareStudentSetBulkTemplates(
                  $Data
              ) {
          
                  $Manager = $this->getConnection()->getEntityManager();
          Severity: Minor
          Found in Application/Education/Certificate/Prepare/Service/Data.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 updatePrepareStudentDivisionResetApproved has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              public function updatePrepareStudentDivisionResetApproved(TblPrepareCertificate $tblPrepare)
              {
          
                  if (($tblDivision = $tblPrepare->getServiceTblDivision())
                      && ($tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision))
          Severity: Minor
          Found in Application/Education/Certificate/Prepare/Service/Data.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 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/Data.php - About 1 hr to fix

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

                    TblPrepareCertificate $tblPrepare,
                    TblPerson $tblPerson,
                    TblCertificate $tblCertificate = null,
                    $IsApproved = false,
                    $IsPrinted = false,
            Severity: Major
            Found in Application/Education/Certificate/Prepare/Service/Data.php - About 50 mins to fix

              Method createPrepare 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/Data.php - About 50 mins to fix

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

                        TblPrepareStudent $tblPrepareStudent,
                        TblCertificate $tblCertificate = null,
                        $IsApproved = false,
                        $IsPrinted = false,
                        $ExcusedDays = null,
                Severity: Major
                Found in Application/Education/Certificate/Prepare/Service/Data.php - About 50 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                          if ($tblGrade->getServiceTblPerson()
                                                              && ($tblPrepareStudent = Prepare::useService()->getPrepareStudentBy($tblPrepare,
                                                                  $tblGrade->getServiceTblPerson()))
                                                              && ($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                              && !$tblCertificate->isInformation()
                  Severity: Major
                  Found in Application/Education/Certificate/Prepare/Service/Data.php - About 45 mins to fix

                    Method updatePrepare 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/Data.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                              && !$tblCertificate->isInformation()
                                                          ) {
                                                              $withTrend = false;
                                                          }
                      Severity: Major
                      Found in Application/Education/Certificate/Prepare/Service/Data.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/Data.php - About 45 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/Data.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/Data.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/Data.php - About 35 mins to fix

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

                                        TblLeaveStudent $tblLeaveStudent,
                                        TblSubject $tblSubject,
                                        TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
                                        $grade,
                                        $isLocked = false
                                Severity: Minor
                                Found in Application/Education/Certificate/Prepare/Service/Data.php - About 35 mins to fix

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

                                      public function updatePrepareStudent(
                                          TblPrepareStudent $tblPrepareStudent,
                                          TblCertificate $tblCertificate = null,
                                          $IsApproved = false,
                                          $IsPrinted = false,
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 3 hrs to fix
                                  Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 700..729

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

                                      public function updatePrepareInformation(
                                          TblPrepareInformation $tblPrepareInformation,
                                          $Field,
                                          $Value
                                      ) {
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 6 other locations - About 2 hrs to fix
                                  Application/Billing/Inventory/Document/Service/Data.php on lines 113..134
                                  Application/Billing/Inventory/Document/Service/Data.php on lines 296..317
                                  Application/Billing/Inventory/Item/Service/Data.php on lines 513..532
                                  Application/Education/Certificate/Generator/Service/Data.php on lines 4353..4374
                                  Application/Reporting/CheckList/Service/Data.php on lines 538..559
                                  Application/Reporting/Dynamic/Service/Data.php on lines 220..238

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function getPrepareStudentBy(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson, $isForced = false)
                                      {
                                  
                                          if ($isForced) {
                                              return $this->getForceEntityBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblPrepareStudent',
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 2 hrs to fix
                                  Application/Education/Graduation/Gradebook/Service/Data.php on lines 523..542
                                  Application/People/Group/Service/Data.php on lines 251..266

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function updateLeaveStudentCertificate(
                                          TblLeaveStudent $tblLeaveStudent,
                                          TblCertificate $tblCertificate
                                      ) {
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 2 hrs to fix
                                  Application/Education/Certificate/Generator/Service/Data.php on lines 3840..3854
                                  Application/People/Person/Service/Data.php on lines 228..242

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 126.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function updateLeaveGrade(
                                          TblLeaveGrade $tblLeaveGrade,
                                          $Grade
                                      ) {
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 13 other locations - About 2 hrs to fix
                                  Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
                                  Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1729..1749
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1799..1819
                                  Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2033..2050
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2298..2315
                                  Application/Reporting/CheckList/Service/Data.php on lines 69..84
                                  Application/Reporting/CheckList/Service/Data.php on lines 567..584
                                  Application/Reporting/CheckList/Service/Data.php on lines 696..713
                                  Application/Reporting/Individual/Service/Data.php on lines 219..238
                                  Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
                                  Application/Setting/Consumer/Service/Data.php on lines 475..493

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

                                      public function updateLeaveInformation(
                                          TblLeaveInformation $tblLeaveInformation,
                                          $Value
                                      ) {
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 13 other locations - About 2 hrs to fix
                                  Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
                                  Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1799..1819
                                  Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2033..2050
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2298..2315
                                  Application/Reporting/CheckList/Service/Data.php on lines 69..84
                                  Application/Reporting/CheckList/Service/Data.php on lines 567..584
                                  Application/Reporting/CheckList/Service/Data.php on lines 696..713
                                  Application/Reporting/Individual/Service/Data.php on lines 219..238
                                  Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
                                  Application/Setting/Consumer/Service/Data.php on lines 475..493

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

                                      public function updateLeaveAdditionalGrade(
                                          TblLeaveAdditionalGrade $tblLeaveAdditionalGrade,
                                          $grade
                                      ) {
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 13 other locations - About 2 hrs to fix
                                  Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
                                  Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1729..1749
                                  Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2033..2050
                                  Application/Education/Lesson/Division/Service/Data.php on lines 2298..2315
                                  Application/Reporting/CheckList/Service/Data.php on lines 69..84
                                  Application/Reporting/CheckList/Service/Data.php on lines 567..584
                                  Application/Reporting/CheckList/Service/Data.php on lines 696..713
                                  Application/Reporting/Individual/Service/Data.php on lines 219..238
                                  Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
                                  Application/Setting/Consumer/Service/Data.php on lines 475..493

                                  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

                                      public function getPrepareGradeBySubject(
                                          TblPrepareCertificate $tblPrepare,
                                          TblPerson $tblPerson,
                                          TblDivision $tblDivision,
                                          TblSubject $tblSubject,
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 1 hr to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 154..171

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 119.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function getPrepareGradeByGradeType(
                                          TblPrepareCertificate $tblPrepare,
                                          TblPerson $tblPerson,
                                          TblDivision $tblDivision,
                                          TblTestType $tblTestType,
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 1 hr to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 126..143

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 119.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if (($tblPrepareStudent = $this->getPrepareStudentBy($tblPrepare, $tblPerson))) {
                                                      // Update
                                                      /** @var TblPrepareStudent $Entity */
                                                      $Entity = $Manager->getEntityById('TblPrepareStudent', $tblPrepareStudent->getId());
                                                      $Protocol = clone $Entity;
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 1 hr to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 766..795
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 954..983

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              if (($tblPrepareStudent = $this->getPrepareStudentBy($tblPrepare, $tblPerson))) {
                                                  // Update
                                                  /** @var TblPrepareStudent $Entity */
                                                  $Entity = $Manager->getEntityById('TblPrepareStudent', $tblPrepareStudent->getId());
                                                  $Protocol = clone $Entity;
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 1 hr to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 766..795
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 890..903

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if ($tblPrepareStudent) {
                                                      // Update
                                                      /** @var TblPrepareStudent $Entity */
                                                      $Entity = $Manager->getEntityById('TblPrepareStudent', $tblPrepareStudent->getId());
                                                      $Protocol = clone $Entity;
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 1 hr to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 890..903
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 954..983

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          if (null === $Entity) {
                                              $Entity = new TblLeaveStudent();
                                              $Entity->setServiceTblPerson($tblPerson);
                                              $Entity->setServiceTblDivision($tblDivision);
                                              $Entity->setServiceTblCertificate($tblCertificate);
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 3 other locations - About 55 mins to fix
                                  Application/Education/Certificate/Generator/Service/Data.php on lines 3879..3888
                                  Application/Education/Certificate/Generator/Service/Data.php on lines 4812..4822
                                  Application/People/Relationship/Service/Data.php on lines 198..207

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

                                  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 ($Entity === null) {
                                              $Entity = new TblLeaveAdditionalGrade();
                                              $Entity->setTblLeaveStudent($tblLeaveStudent);
                                              $Entity->setServiceTblSubject($tblSubject);
                                              $Entity->setTblPrepareAdditionalGradeType($tblPrepareAdditionalGradeType);
                                  Severity: Minor
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 55 mins to fix
                                  Application/Billing/Accounting/Debtor/Service/Data.php on lines 407..418

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function getPrepareAdditionalGradeBy(
                                          TblPrepareCertificate $tblPrepareCertificate,
                                          TblPerson $tblPerson,
                                          TblSubject $tblSubject,
                                          TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 2 other locations - About 55 mins to fix
                                  Application/Education/Graduation/Gradebook/Service/Data.php on lines 823..832
                                  Application/Education/Graduation/Gradebook/Service/Data.php on lines 842..851

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 98.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          if ($Entity === null) {
                                              $Entity = new TblPrepareGrade();
                                              $Entity->setTblPrepareCertificate($tblPrepare);
                                              $Entity->setServiceTblPerson($tblPerson);
                                              $Entity->setServiceTblDivision($tblDivision);
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 3 other locations - About 50 mins to fix
                                  Application/Billing/Bookkeeping/Invoice/Service/Data.php on lines 472..484
                                  Application/Document/Storage/Service/Data.php on lines 381..391
                                  Application/People/Meta/Student/Service/Data/Subject.php on lines 208..230

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

                                  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 (($tblPrepareAdditionalGradeList = $this->getPrepareAdditionalGradeListBy(
                                                                  $tblPrepare, $tblPersonItem, $tblPrepareAdditionalGradeType
                                                              ))
                                                              ) {
                                                                  foreach ($tblPrepareAdditionalGradeList as $tblPrepareAdditionalGrade) {
                                  Severity: Minor
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 50 mins to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 989..1007

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

                                  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 (($tblPrepareAdditionalGradeType = $this->getPrepareAdditionalGradeTypeByIdentifier('EN'))
                                                          && ($tblPrepareAdditionalGradeList = $this->getPrepareAdditionalGradeListBy(
                                                              $tblPrepare, $tblPerson, $tblPrepareAdditionalGradeType
                                                          ))) {
                                                          foreach ($tblPrepareAdditionalGradeList as $tblPrepareAdditionalGrade) {
                                  Severity: Minor
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 50 mins to fix
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 806..824

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function destroyPrepareAdditionalGrade(TblPrepareAdditionalGrade $tblPrepareAdditionalGrade)
                                      {
                                  
                                          $Manager = $this->getEntityManager();
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 3 other locations - About 45 mins to fix
                                  Application/Document/Generator/Service/Data.php on lines 274..287
                                  Application/Education/Certificate/Generate/Service/Data.php on lines 189..203
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1396..1410

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 95.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      public function destroyPrepareCertificate(TblPrepareCertificate $tblPrepareCertificate)
                                      {
                                  
                                          $Manager = $this->getEntityManager();
                                  
                                  
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 3 other locations - About 45 mins to fix
                                  Application/Document/Generator/Service/Data.php on lines 274..287
                                  Application/Education/Certificate/Generate/Service/Data.php on lines 189..203
                                  Application/Education/Certificate/Prepare/Service/Data.php on lines 1296..1309

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 95.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          if ($Entity === null) {
                                              $Entity = new TblPrepareInformation();
                                              $Entity->setTblPrepareCertificate($tblPrepare);
                                              $Entity->setServiceTblPerson($tblPerson);
                                              $Entity->setField($Field);
                                  Severity: Minor
                                  Found in Application/Education/Certificate/Prepare/Service/Data.php and 1 other location - About 30 mins to fix
                                  Application/Billing/Inventory/Setting/Service/Data.php on lines 189..201

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

                                  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