Showing 107 of 107 total issues

Class Client has 43 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Client
    attr_reader :version

    def initialize(options)
      @base_url   = options.fetch(:url)
Severity: Minor
Found in lib/dhis2/client.rb - About 5 hrs to fix

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

      module Api
        module Version227
          class DataElement < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version227/data_element.rb and 3 other locations - About 2 hrs to fix
    lib/dhis2/api/version225/data_element.rb on lines 4..37
    lib/dhis2/api/version226/data_element.rb on lines 4..37
    lib/dhis2/api/version228/data_element.rb on lines 4..37

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 95.

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

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

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

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

    Refactorings

    Further Reading

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

      module Api
        module Version228
          class DataElement < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version228/data_element.rb and 3 other locations - About 2 hrs to fix
    lib/dhis2/api/version225/data_element.rb on lines 4..37
    lib/dhis2/api/version226/data_element.rb on lines 4..37
    lib/dhis2/api/version227/data_element.rb on lines 4..37

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 95.

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

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

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

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

    Refactorings

    Further Reading

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

      module Api
        module Version226
          class DataElement < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version226/data_element.rb and 3 other locations - About 2 hrs to fix
    lib/dhis2/api/version225/data_element.rb on lines 4..37
    lib/dhis2/api/version227/data_element.rb on lines 4..37
    lib/dhis2/api/version228/data_element.rb on lines 4..37

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 95.

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

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

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

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

    Refactorings

    Further Reading

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

      module Api
        module Version225
          class DataElement < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version225/data_element.rb and 3 other locations - About 2 hrs to fix
    lib/dhis2/api/version226/data_element.rb on lines 4..37
    lib/dhis2/api/version227/data_element.rb on lines 4..37
    lib/dhis2/api/version228/data_element.rb on lines 4..37

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 95.

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

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

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

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

    Refactorings

    Further Reading

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

      module Api
        module Version228
          class DataSet < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version228/data_set.rb and 2 other locations - About 1 hr to fix
    lib/dhis2/api/version226/data_set.rb on lines 4..27
    lib/dhis2/api/version227/data_set.rb on lines 4..27

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

    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

      module Api
        module Version227
          class DataSet < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version227/data_set.rb and 2 other locations - About 1 hr to fix
    lib/dhis2/api/version226/data_set.rb on lines 4..27
    lib/dhis2/api/version228/data_set.rb on lines 4..27

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

    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

      module Api
        module Version226
          class DataSet < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version226/data_set.rb and 2 other locations - About 1 hr to fix
    lib/dhis2/api/version227/data_set.rb on lines 4..27
    lib/dhis2/api/version228/data_set.rb on lines 4..27

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

    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

      module Api
        module Version227
          class Event < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version227/event.rb and 3 other locations - About 1 hr to fix
    lib/dhis2/api/version225/event.rb on lines 4..27
    lib/dhis2/api/version226/event.rb on lines 4..27
    lib/dhis2/api/version228/event.rb on lines 4..27

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

    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

      module Api
        module Version226
          class Event < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version226/event.rb and 3 other locations - About 1 hr to fix
    lib/dhis2/api/version225/event.rb on lines 4..27
    lib/dhis2/api/version227/event.rb on lines 4..27
    lib/dhis2/api/version228/event.rb on lines 4..27

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

    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

      module Api
        module Version225
          class Event < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version225/event.rb and 3 other locations - About 1 hr to fix
    lib/dhis2/api/version226/event.rb on lines 4..27
    lib/dhis2/api/version227/event.rb on lines 4..27
    lib/dhis2/api/version228/event.rb on lines 4..27

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

    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

      module Api
        module Version228
          class Event < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version228/event.rb and 3 other locations - About 1 hr to fix
    lib/dhis2/api/version225/event.rb on lines 4..27
    lib/dhis2/api/version226/event.rb on lines 4..27
    lib/dhis2/api/version227/event.rb on lines 4..27

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

    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

      module Api
        module Version227
          module Constants
            include ::Dhis2::Api::Shared::Constants
    
    
    Severity: Major
    Found in lib/dhis2/api/version227/constants.rb and 1 other location - About 1 hr to fix
    lib/dhis2/api/version228/constants.rb on lines 4..17

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

    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

      module Api
        module Version228
          module Constants
            include ::Dhis2::Api::Shared::Constants
    
    
    Severity: Major
    Found in lib/dhis2/api/version228/constants.rb and 1 other location - About 1 hr to fix
    lib/dhis2/api/version227/constants.rb on lines 4..17

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

    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

      module Api
        module Version226
          class CategoryCombo < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version226/category_combo.rb and 4 other locations - About 1 hr to fix
    lib/dhis2/api/version224/category_combo.rb on lines 4..20
    lib/dhis2/api/version225/category_combo.rb on lines 4..20
    lib/dhis2/api/version227/category_combo.rb on lines 4..20
    lib/dhis2/api/version228/category_combo.rb on lines 4..20

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

    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

      module Api
        module Version225
          class CategoryCombo < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version225/category_combo.rb and 4 other locations - About 1 hr to fix
    lib/dhis2/api/version224/category_combo.rb on lines 4..20
    lib/dhis2/api/version226/category_combo.rb on lines 4..20
    lib/dhis2/api/version227/category_combo.rb on lines 4..20
    lib/dhis2/api/version228/category_combo.rb on lines 4..20

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

    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

      module Api
        module Version227
          class CategoryCombo < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version227/category_combo.rb and 4 other locations - About 1 hr to fix
    lib/dhis2/api/version224/category_combo.rb on lines 4..20
    lib/dhis2/api/version225/category_combo.rb on lines 4..20
    lib/dhis2/api/version226/category_combo.rb on lines 4..20
    lib/dhis2/api/version228/category_combo.rb on lines 4..20

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

    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

      module Api
        module Version224
          class CategoryCombo < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version224/category_combo.rb and 4 other locations - About 1 hr to fix
    lib/dhis2/api/version225/category_combo.rb on lines 4..20
    lib/dhis2/api/version226/category_combo.rb on lines 4..20
    lib/dhis2/api/version227/category_combo.rb on lines 4..20
    lib/dhis2/api/version228/category_combo.rb on lines 4..20

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

    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

      module Api
        module Version228
          class CategoryCombo < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version228/category_combo.rb and 4 other locations - About 1 hr to fix
    lib/dhis2/api/version224/category_combo.rb on lines 4..20
    lib/dhis2/api/version225/category_combo.rb on lines 4..20
    lib/dhis2/api/version226/category_combo.rb on lines 4..20
    lib/dhis2/api/version227/category_combo.rb on lines 4..20

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

    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

      module Api
        module Version224
          class Program < ::Dhis2::Api::Base
            include ::Dhis2::Api::Listable
            include ::Dhis2::Api::Findable
    Severity: Major
    Found in lib/dhis2/api/version224/program.rb and 1 other location - About 1 hr to fix
    lib/dhis2/api/version225/program.rb on lines 4..20

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

    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

    Severity
    Category
    Status
    Source
    Language