DerDu/SPHERE-Framework

View on GitHub
Application/Education/Graduation/Gradebook/ScoreRule/Service.php

Summary

Maintainability
F
1 wk
Test Coverage

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

<?php
/**
 * Created by PhpStorm.
 * User: Kauschke
 * Date: 21.09.2016
Severity: Major
Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 day to fix

    Function updateScoreRuleDivisionSubject has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateScoreRuleDivisionSubject(
            IFormInterface $Stage = null,
            TblScoreRule $tblScoreRule,
            TblYear $tblYear = null,
            $Data = null
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    abstract class Service extends ServiceMinimumGrade
    {
    
        const PREG_MATCH_DECIMAL_NUMBER = '!^[0-9]+((\.|,)[0-9]+)?$!is';
    
    
    Severity: Major
    Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 day to fix

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

          public function getMissingSubjectsWithScoreType()
          {
      
              $list = array();
              if (($tblYearList = Term::useService()->getYearByNow())) {
      Severity: Minor
      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 updateScoreRuleSubjectGroup has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function updateScoreRuleSubjectGroup(
              IFormInterface $Stage = null,
              TblScoreRule $tblScoreRule,
              TblYear $tblYear = null,
              $Data = null
      Severity: Minor
      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 updateScoreRuleDivisionSubject has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function updateScoreRuleDivisionSubject(
              IFormInterface $Stage = null,
              TblScoreRule $tblScoreRule,
              TblYear $tblYear = null,
              $Data = null
      Severity: Major
      Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 2 hrs to fix

        Function getGradeTypeAllByScoreCondition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getGradeTypeAllByScoreCondition(TblScoreCondition $tblScoreCondition)
            {
                $tblGradeTypeList = array();
                if (($tblScoreConditionGroupList = $this->getScoreConditionGroupListByCondition($tblScoreCondition))) {
                    foreach ($tblScoreConditionGroupList as $item) {
        Severity: Minor
        Found in Application/Education/Graduation/Gradebook/ScoreRule/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 getMissingSubjectsWithScoreType has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getMissingSubjectsWithScoreType()
            {
        
                $list = array();
                if (($tblYearList = Term::useService()->getYearByNow())) {
        Severity: Minor
        Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

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

              public function getRequirementsForScoreCondition(TblScoreCondition $tblScoreCondition, $isDisplay = false)
              {
                  $requirements = array();
                  $displayList = array();
                  // period
          Severity: Minor
          Found in Application/Education/Graduation/Gradebook/ScoreRule/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 updateScoreRuleSubjectGroup has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function updateScoreRuleSubjectGroup(
                  IFormInterface $Stage = null,
                  TblScoreRule $tblScoreRule,
                  TblYear $tblYear = null,
                  $Data = null
          Severity: Minor
          Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

            Method updateScoreGroup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function updateScoreGroup(IFormInterface $Stage = null, $Id, $ScoreGroup)
                {
            
                    /**
                     * Skip to Frontend
            Severity: Minor
            Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

              Method getRequirementsForScoreCondition has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getRequirementsForScoreCondition(TblScoreCondition $tblScoreCondition, $isDisplay = false)
                  {
                      $requirements = array();
                      $displayList = array();
                      // period
              Severity: Minor
              Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

                Method createScoreGroup has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createScoreGroup(IFormInterface $Stage = null, $ScoreGroup = null)
                    {
                
                        /**
                         * Skip to Frontend
                Severity: Minor
                Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

                  Method updateScoreCondition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function updateScoreCondition(IFormInterface $Stage = null, $Id, $ScoreCondition)
                      {
                  
                          /**
                           * Skip to Frontend
                  Severity: Minor
                  Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 hr to fix

                    Function updateScoreGroup has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function updateScoreGroup(IFormInterface $Stage = null, $Id, $ScoreGroup)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Minor
                    Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 45 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

                    Consider simplifying this complex logical expression.
                    Open

                                    if ($tblScoreRuleSubjectGroup->getServiceTblDivision()
                                        && $tblScoreRuleSubjectGroup->getServiceTblSubject()
                                        && $tblScoreRuleSubjectGroup->getServiceTblSubjectGroup()
                                        && !isset($Data[$tblScoreRuleSubjectGroup->getServiceTblDivision()->getId()]
                                            [$tblScoreRuleSubjectGroup->getServiceTblSubject()->getId()]
                    Severity: Major
                    Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 40 mins to fix

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

                          public function updateScoreRule(IFormInterface $Stage = null, $Id, $ScoreRule)
                          {
                      
                              /**
                               * Skip to Frontend
                      Severity: Minor
                      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 createScoreGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function createScoreGroup(IFormInterface $Stage = null, $ScoreGroup = null)
                          {
                      
                              /**
                               * Skip to Frontend
                      Severity: Minor
                      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 updateScoreCondition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function updateScoreCondition(IFormInterface $Stage = null, $Id, $ScoreCondition)
                          {
                      
                              /**
                               * Skip to Frontend
                      Severity: Minor
                      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 createScoreCondition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function createScoreCondition(IFormInterface $Stage = null, $ScoreCondition = null)
                          {
                      
                              /**
                               * Skip to Frontend
                      Severity: Minor
                      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 getScoreGroupAllByScoreCondition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getScoreGroupAllByScoreCondition(TblScoreCondition $tblScoreCondition)
                          {
                              $tblScoreGroupList = array();
                              if (($tblScoreConditionGroupList = $this->getScoreConditionGroupListByCondition($tblScoreCondition))) {
                                  foreach ($tblScoreConditionGroupList as $item) {
                      Severity: Minor
                      Found in Application/Education/Graduation/Gradebook/ScoreRule/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 (is_array($Data)) {
                                  foreach ($Data as $divisionId => $subjectList) {
                                      $tblDivision = Division::useService()->getDivisionById($divisionId);
                                      if ($tblDivision) {
                                          if (is_array($subjectList)) {
                      Application/Education/Graduation/Gradebook/Service.php on lines 1276..1300

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

                      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 addScoreGroupGradeTypeList(
                              TblGradeType $tblGradeType,
                              TblScoreGroup $tblScoreGroup,
                              $Multiplier
                          ) {
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 349..364
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 373..388

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

                      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 addScoreConditionGradeTypeList(
                              TblGradeType $tblGradeType,
                              TblScoreCondition $tblScoreCondition,
                              $count
                          ) {
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 261..276
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 373..388

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

                      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 addScoreConditionGroupRequirement(
                              TblScoreGroup $tblScoreGroup,
                              TblScoreCondition $tblScoreCondition,
                              $count
                          ) {
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 261..276
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 349..364

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

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

                          public function removeScoreConditionGroupRequirement(
                              TblScoreConditionGroupRequirement $tblScoreConditionGroupRequirement
                          ) {
                      
                              $tblScoreCondition = $tblScoreConditionGroupRequirement->getTblScoreCondition();
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 283..297
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 326..340
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 395..409
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 458..472

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

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

                          public function removeScoreConditionGroupList(
                              TblScoreConditionGroupList $tblScoreConditionGroupList
                          ) {
                      
                              $tblScoreCondition = $tblScoreConditionGroupList->getTblScoreCondition();
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 283..297
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 395..409
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 416..430
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 458..472

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

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

                          public function removeScoreGroupGradeTypeList(
                              TblScoreGroupGradeTypeList $tblScoreGroupGradeTypeList
                          ) {
                      
                              $tblScoreGroup = $tblScoreGroupGradeTypeList->getTblScoreGroup();
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 326..340
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 395..409
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 416..430
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 458..472

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

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

                          public function removeScoreRuleConditionList(
                              TblScoreRuleConditionList $tblScoreRuleConditionList
                          ) {
                      
                              $tblScoreRule = $tblScoreRuleConditionList->getTblScoreRule();
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 283..297
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 326..340
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 395..409
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 416..430

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

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

                          public function removeScoreConditionGradeTypeList(
                              TblScoreConditionGradeTypeList $tblScoreConditionGradeTypeList
                          ) {
                      
                              $tblScoreCondition = $tblScoreConditionGradeTypeList->getTblScoreCondition();
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 283..297
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 326..340
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 416..430
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 458..472

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

                      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 (($tblScoreConditionGradeTypeList = $this->getScoreConditionGradeTypeListByCondition($tblScoreCondition))) {
                                  $temp = array();
                                  foreach ($tblScoreConditionGradeTypeList as $tblScoreConditionGradeType) {
                                      if (($tblGradeType = $tblScoreConditionGradeType->getTblGradeType())) {
                                          $temp[] = $tblScoreConditionGradeType;
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 1227..1237

                      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 (($tblScoreConditionGroupRequirementList = $this->getScoreConditionGroupRequirementAllByCondition($tblScoreCondition))) {
                                  $temp = array();
                                  foreach ($tblScoreConditionGroupRequirementList as $tblScoreConditionGroupRequirement) {
                                      if (($tblScoreGroup = $tblScoreConditionGroupRequirement->getTblScoreGroup())) {
                                          $temp[] = $tblScoreConditionGroupRequirement;
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 1215..1225

                      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

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

                              if (isset($ScoreGroup['Multiplier']) && empty($ScoreGroup['Multiplier'])) {
                                  $Stage->setError('ScoreGroup[Multiplier]', 'Bitte geben sie einen Faktor an');
                                  $Error = true;
                              } elseif (isset($ScoreGroup['Multiplier']) && !preg_match(self::PREG_MATCH_DECIMAL_NUMBER, $ScoreGroup['Multiplier'])) {
                                  $Stage->setError('ScoreGroup[Multiplier]', 'Bitte geben sie eine Zahl als Faktor an');
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 647..653

                      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

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

                              if (isset($ScoreGroup['Multiplier']) && empty($ScoreGroup['Multiplier'])) {
                                  $Stage->setError('ScoreGroup[Multiplier]', 'Bitte geben sie einen Faktor an');
                                  $Error = true;
                              } elseif (isset($ScoreGroup['Multiplier']) && !preg_match(self::PREG_MATCH_DECIMAL_NUMBER, $ScoreGroup['Multiplier'])) {
                                  $Stage->setError('ScoreGroup[Multiplier]', 'Bitte geben sie eine Zahl als Faktor an');
                      Application/Education/Graduation/Gradebook/ScoreRule/Service.php on lines 232..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 98.

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

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

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

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

                      Refactorings

                      Further Reading

                      There are no issues that match your filters.

                      Category
                      Status