DerDu/SPHERE-Framework

View on GitHub
Application/Education/Lesson/Term/Service.php

Summary

Maintainability
F
1 wk
Test Coverage

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

<?php
namespace SPHERE\Application\Education\Lesson\Term;

use SPHERE\Application\Education\Lesson\Term\Service\Data;
use SPHERE\Application\Education\Lesson\Term\Service\Entity\TblHoliday;
Severity: Major
Found in Application/Education/Lesson/Term/Service.php - About 1 day to fix

    Function getYearAllByDate has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getYearAllByDate(\DateTime $Date)
        {
    
            $EntityList = array();
            $tblYearAll = Term::useService()->getYearAll();
    Severity: Minor
    Found in Application/Education/Lesson/Term/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

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

    class Service extends AbstractService
    {
    
        /**
         * @return false|ViewYear[]
    Severity: Minor
    Found in Application/Education/Lesson/Term/Service.php - About 6 hrs to fix

      Function getYearAllSinceYears has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getYearAllSinceYears($Year)
          {
      
              $Now = (new \DateTime('now'))->sub(new \DateInterval('P' . $Year . 'Y'));
      
      
      Severity: Minor
      Found in Application/Education/Lesson/Term/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

      Function getYearAllFutureYears has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getYearAllFutureYears($Year)
          {
      
              $Now = (new \DateTime('now'))->add(new \DateInterval('P' . $Year . 'Y'));
      
      
      Severity: Minor
      Found in Application/Education/Lesson/Term/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

      Function addHolidaysToYear has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function addHolidaysToYear(
              IFormInterface $Form,
              TblYear $tblYear,
              $DataAddHoliday = null,
              $DataRemoveHoliday = null
      Severity: Minor
      Found in Application/Education/Lesson/Term/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 createPeriod has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createPeriod(
              IFormInterface $Form,
              $Period
          ) {
      
      
      Severity: Minor
      Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

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

            public function changeYear(
                IFormInterface &$Stage = null,
                TblYear $tblYear,
                $Year
            ) {
        Severity: Minor
        Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

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

            public function createPeriod(
                IFormInterface $Form,
                $Period
            ) {
        
        
        Severity: Minor
        Found in Application/Education/Lesson/Term/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 getYearAllByDate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getYearAllByDate(\DateTime $Date)
            {
        
                $EntityList = array();
                $tblYearAll = Term::useService()->getYearAll();
        Severity: Minor
        Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

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

              public function changePeriod(
                  IFormInterface &$Stage = null,
                  TblPeriod $tblPeriod,
                  $Period
              ) {
          Severity: Minor
          Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

            Method changeYear has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function changeYear(
                    IFormInterface &$Stage = null,
                    TblYear $tblYear,
                    $Year
                ) {
            Severity: Minor
            Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

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

                  public function getYearAllFutureYears($Year)
                  {
              
                      $Now = (new \DateTime('now'))->add(new \DateInterval('P' . $Year . 'Y'));
              
              
              Severity: Minor
              Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

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

                    public function getYearAllSinceYears($Year)
                    {
                
                        $Now = (new \DateTime('now'))->sub(new \DateInterval('P' . $Year . 'Y'));
                
                
                Severity: Minor
                Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

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

                      public function updateHoliday(IFormInterface $Stage = null, TblHoliday $tblHoliday, $Data)
                      {
                  
                          /**
                           * Skip to Frontend
                  Severity: Minor
                  Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

                    Method createHoliday has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function createHoliday(IFormInterface $Stage = null, $Data)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Minor
                    Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

                      Function createYear has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function createYear(
                              IFormInterface $Form,
                              $Year
                          ) {
                      
                      
                      Severity: Minor
                      Found in Application/Education/Lesson/Term/Service.php - About 1 hr to fix

                      Cognitive Complexity

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

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

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

                      Further reading

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

                          public function changePeriod(
                              IFormInterface &$Stage = null,
                              TblPeriod $tblPeriod,
                              $Period
                          ) {
                      Severity: Minor
                      Found in Application/Education/Lesson/Term/Service.php - About 55 mins to fix

                      Cognitive Complexity

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

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

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

                      Further reading

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

                          public function insertPeriod($Name, $From, $To, $Description = '', $IsLevel12 = false)
                      Severity: Minor
                      Found in Application/Education/Lesson/Term/Service.php - About 35 mins to fix

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

                            public function updateHoliday(IFormInterface $Stage = null, TblHoliday $tblHoliday, $Data)
                            {
                        
                                /**
                                 * Skip to Frontend
                        Severity: Minor
                        Found in Application/Education/Lesson/Term/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 destroyPeriod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function destroyPeriod(TblPeriod $tblPeriod)
                            {
                        
                                if (null === $tblPeriod) {
                                    return '';
                        Severity: Minor
                        Found in Application/Education/Lesson/Term/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 createHoliday has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function createHoliday(IFormInterface $Stage = null, $Data)
                            {
                        
                                /**
                                 * Skip to Frontend
                        Severity: Minor
                        Found in Application/Education/Lesson/Term/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

                            public function getYearAllFutureYears($Year)
                            {
                        
                                $Now = (new \DateTime('now'))->add(new \DateInterval('P' . $Year . 'Y'));
                        
                        
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 day to fix
                        Application/Education/Lesson/Term/Service.php on lines 95..131

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

                        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 getYearAllSinceYears($Year)
                            {
                        
                                $Now = (new \DateTime('now'))->sub(new \DateInterval('P' . $Year . 'Y'));
                        
                        
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 day to fix
                        Application/Education/Lesson/Term/Service.php on lines 138..174

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

                        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 destroyPeriod(TblPeriod $tblPeriod)
                            {
                        
                                if (null === $tblPeriod) {
                                    return '';
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 4 hrs to fix
                        Application/Education/Lesson/Division/Service.php on lines 1446..1470

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

                        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 addYearPeriod($Year, $Period)
                            {
                        
                                $tblYear = $this->getYearById($Year);
                                $tblPeriod = $this->getPeriodById($Period);
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 hr to fix
                        Application/Education/Lesson/Term/Service.php on lines 398..410

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

                        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 removeYearPeriod($Year, $Period)
                            {
                        
                                $tblYear = $this->getYearById($Year);
                                $tblPeriod = $this->getPeriodById($Period);
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 hr to fix
                        Application/Education/Lesson/Term/Service.php on lines 356..368

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

                        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 (!$Error) {
                                    if ((new Data($this->getBinding()))->createYear($Year['Year'], $Year['Description'])) {
                                        return new Success('Das Schuljahr wurde erfolgreich hinzugefĆ¼gt')
                                        . new Redirect($this->getRequest()->getUrl(), Redirect::TIMEOUT_SUCCESS);
                                    } else {
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 hr to fix
                        Application/Education/Lesson/Subject/Service.php on lines 662..674

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if (isset($Year['Year']) && empty($Year['Year'])) {
                                    $Stage->setError('Year[Year]', 'Bitte geben Sie ein Jahr an');
                                    $Error = true;
                                } else {
                                    if (($CheckYear = Term::useService()->checkYearExist($Year['Year']))) {
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 hr to fix
                        Application/Reporting/SerialLetter/Service.php on lines 1423..1433

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

                        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 destroyYear(TblYear $tblYear)
                            {
                        
                                if (null === $tblYear) {
                                    return '';
                        Severity: Major
                        Found in Application/Education/Lesson/Term/Service.php and 1 other location - About 1 hr to fix
                        Application/Education/Lesson/Subject/Service.php on lines 221..235

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

                        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