DerDu/SPHERE-Framework

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

Summary

Maintainability
C
1 day
Test Coverage

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

        TblYear $tblYear,
        $Date,
        $Name,
        TblCertificateType $tblCertificateType,
        TblTask $tblAppointedDateTask = null,
Severity: Major
Found in Application/Education/Certificate/Generate/Service/Data.php - About 1 hr to fix

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

            TblGenerateCertificate $tblGenerateCertificate,
            $Date,
            $IsDivisionTeacherAvailable,
            $HeadmasterName,
            TblCommonGender $tblCommonGender = null,
    Severity: Major
    Found in Application/Education/Certificate/Generate/Service/Data.php - About 1 hr to fix

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

          public function createGenerateCertificateSetting(
              TblGenerateCertificate $tblGenerateCertificate,
              $Field,
              $Value
          ) {
      Severity: Major
      Found in Application/Education/Certificate/Generate/Service/Data.php and 1 other location - About 3 hrs to fix
      Application/Billing/Inventory/Document/Service/Data.php on lines 265..287

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

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

          public function lockGenerateCertificate(
              TblGenerateCertificate $tblGenerateCertificate,
              $IsLocked = true
          ) {
      
      
      Severity: Major
      Found in Application/Education/Certificate/Generate/Service/Data.php and 5 other locations - About 2 hrs to fix
      Application/Billing/Bookkeeping/Invoice/Service/Data.php on lines 494..511
      Application/People/Relationship/Service/Data.php on lines 216..229
      Application/Transfer/Indiware/Import/Service/Data.php on lines 495..513
      Application/Transfer/Indiware/Import/Service/Data.php on lines 541..559
      Application/Transfer/Untis/Import/Service/Data.php on lines 145..161

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

          public function updateGenerateCertificateSetting(
              TblGenerateCertificateSetting $tblGenerateCertificateSetting,
              $Value
          ) {
      
      
      Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
      Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
      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 4 locations. Consider refactoring.
      Open

          public function destroyGenerateCertificate(TblGenerateCertificate $tblGenerateCertificate)
          {
      
              $Manager = $this->getEntityManager();
      
      
      Severity: Major
      Found in Application/Education/Certificate/Generate/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/Prepare/Service/Data.php on lines 1296..1309
      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

      There are no issues that match your filters.

      Category
      Status