openxml/openxml-pptx

View on GitHub

Showing 22 of 22 total issues

Method office_theme has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def self.office_theme
          new.tap do |theme|
            theme.theme_name = "Office Theme"
            theme.theme_elements.color_scheme.tap do |scheme|
              scheme.scheme_name = "Office"
Severity: Minor
Found in lib/openxml/pptx/parts/theme.rb - About 1 hr to fix

    Method add_child_part has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def add_child_part(part, with_index: nil)
          part.path = indexed_path(part.path, with_index) unless with_index.nil?
          part.parent = self if part.respond_to?(:parent=)
          add_relationship part.relationship_type, part.path
          return unless instance_variable_defined?("@parent")
    Severity: Minor
    Found in lib/openxml/pptx/relatable_part.rb - 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

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

            property_choice do
              value_property :no_fill, klass: OpenXml::DrawingML::Properties::FillNone
              property :solid_fill, klass: OpenXml::DrawingML::Properties::FillSolid
              property :gradient_fill, klass: OpenXml::DrawingML::Properties::FillGradient
              property :pattern_fill, klass: OpenXml::DrawingML::Properties::FillPattern
    Severity: Major
    Found in lib/openxml/pptx/properties/background_properties.rb and 1 other location - About 1 hr to fix
    lib/openxml/pptx/properties/group_shape_properties.rb on lines 14..21

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

    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

            property_choice do
              value_property :no_fill, klass: OpenXml::DrawingML::Properties::FillNone
              property :solid_fill, klass: OpenXml::DrawingML::Properties::FillSolid
              property :gradient_fill, klass: OpenXml::DrawingML::Properties::FillGradient
              property :pattern_fill, klass: OpenXml::DrawingML::Properties::FillPattern
    Severity: Major
    Found in lib/openxml/pptx/properties/group_shape_properties.rb and 1 other location - About 1 hr to fix
    lib/openxml/pptx/properties/background_properties.rb on lines 11..18

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

    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 Pptx
        module Properties
          class NonVisualShapeDrawingProperties < OpenXml::Properties::ComplexProperty
            include OpenXml::ContainsProperties
            include OpenXml::RenderWhenEmpty
    lib/openxml/pptx/properties/non_visual_picutre_drawing_properties.rb on lines 2..15

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

    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 Pptx
        module Properties
          class NonVisualPictureDrawingProperties < OpenXml::Properties::ComplexProperty
            include OpenXml::ContainsProperties
            include OpenXml::RenderWhenEmpty
    lib/openxml/pptx/properties/non_visual_shape_drawing_properties.rb on lines 2..15

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

    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

            def build_slide_master(named: nil, theme: nil)
              OpenXml::Pptx::Parts::SlideMaster.new.tap do |slide_master|
                slide_master.common_slide_data.slide_name = named unless named.nil?
                slide_master.set_theme(theme) unless theme.nil?
                add_slide_master(slide_master)
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb and 1 other location - About 25 mins to fix
    lib/openxml/pptx/parts/presentation.rb on lines 82..86

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

    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

    Method build_slide_master has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

            def build_slide_master(named: nil, theme: nil)
              OpenXml::Pptx::Parts::SlideMaster.new.tap do |slide_master|
                slide_master.common_slide_data.slide_name = named unless named.nil?
                slide_master.set_theme(theme) unless theme.nil?
                add_slide_master(slide_master)
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb - 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

    Method build_slide has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

            def build_slide(named: nil, slide_layout: nil)
              OpenXml::Pptx::Parts::Slide.new.tap do |slide|
                slide.common_slide_data.slide_name = named unless named.nil?
                slide.set_slide_layout(slide_layout) unless slide_layout.nil?
                add_slide(slide)
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb - 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

            def build_slide(named: nil, slide_layout: nil)
              OpenXml::Pptx::Parts::Slide.new.tap do |slide|
                slide.common_slide_data.slide_name = named unless named.nil?
                slide.set_slide_layout(slide_layout) unless slide_layout.nil?
                add_slide(slide)
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb and 1 other location - About 25 mins to fix
    lib/openxml/pptx/parts/presentation.rb on lines 98..102

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

    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

            def add_slide(slide)
              slides.push(slide)
              add_child_part(slide, with_index: slides.count)
              slide_id_list << OpenXml::Pptx::Properties::SlideId.new.tap do |slide_id|
                slide_id.rid = relationships_by_path[slide.path].id
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb and 2 other locations - About 20 mins to fix
    lib/openxml/pptx/parts/presentation.rb on lines 90..94
    lib/openxml/pptx/parts/slide_master.rb on lines 47..51

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

    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

            def add_slide_master(slide_master)
              slide_masters.push(slide_master)
              add_child_part(slide_master, with_index: slide_masters.count)
              slide_master_id_list << OpenXml::Pptx::Properties::SlideMasterId.new.tap do |master_id|
                master_id.rid = relationships_by_path[slide_master.path].id
    Severity: Minor
    Found in lib/openxml/pptx/parts/presentation.rb and 2 other locations - About 20 mins to fix
    lib/openxml/pptx/parts/presentation.rb on lines 74..78
    lib/openxml/pptx/parts/slide_master.rb on lines 47..51

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

    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

            def add_slide_layout(layout)
              layouts.push(layout)
              add_child_part(layout, with_index: layouts.count)
              slide_layout_id_list << OpenXml::Pptx::Properties::SlideLayoutId.new.tap do |layout_id|
                layout_id.rid = relationships_by_path[layout.path].id
    Severity: Minor
    Found in lib/openxml/pptx/parts/slide_master.rb and 2 other locations - About 20 mins to fix
    lib/openxml/pptx/parts/presentation.rb on lines 74..78
    lib/openxml/pptx/parts/presentation.rb on lines 90..94

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

    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 Pptx
        module Properties
          class NonVisualGroupShapeDrawingProperties < SimplePropertyContainerProperty
            include OpenXml::RenderWhenEmpty
            namespace :p
    lib/openxml/pptx/properties/non_visual_graphic_frame_drawing_properties.rb on lines 2..12

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

    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 Pptx
        module Properties
          class HandoutMasterId < OpenXml::Properties::ComplexProperty
            include OpenXml::ContainsProperties
            namespace :p
    Severity: Minor
    Found in lib/openxml/pptx/properties/handout_master_id.rb and 1 other location - About 20 mins to fix
    lib/openxml/pptx/properties/notes_master_id.rb on lines 2..15

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

    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 Pptx
        module Properties
          class NotesMasterId < OpenXml::Properties::ComplexProperty
            include OpenXml::ContainsProperties
            namespace :p
    Severity: Minor
    Found in lib/openxml/pptx/properties/notes_master_id.rb and 1 other location - About 20 mins to fix
    lib/openxml/pptx/properties/handout_master_id.rb on lines 2..15

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

    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 Pptx
        module Properties
          class NonVisualGraphicFrameDrawingProperties < SimplePropertyContainerProperty
            include OpenXml::RenderWhenEmpty
            namespace :p
    lib/openxml/pptx/properties/non_visual_group_shape_drawing_properties.rb on lines 2..12

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

    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 Pptx
        module Properties
          class NonVisualShapeProperties < SimplePropertyContainerProperty
            include OpenXml::RenderWhenEmpty
            namespace :p
    Severity: Minor
    Found in lib/openxml/pptx/properties/non_visual_shape_properties.rb and 4 other locations - About 15 mins to fix
    lib/openxml/pptx/properties/non_visual_connection_shape_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_graphic_frame_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_group_shape_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_picture_properties.rb on lines 2..13

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

    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 Pptx
        module Properties
          class NonVisualPictureProperties < SimplePropertyContainerProperty
            include OpenXml::RenderWhenEmpty
            namespace :p
    Severity: Minor
    Found in lib/openxml/pptx/properties/non_visual_picture_properties.rb and 4 other locations - About 15 mins to fix
    lib/openxml/pptx/properties/non_visual_connection_shape_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_graphic_frame_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_group_shape_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_shape_properties.rb on lines 2..13

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

    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 Pptx
        module Properties
          class NonVisualGroupShapeProperties < SimplePropertyContainerProperty
            include OpenXml::RenderWhenEmpty
            namespace :p
    lib/openxml/pptx/properties/non_visual_connection_shape_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_graphic_frame_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_picture_properties.rb on lines 2..13
    lib/openxml/pptx/properties/non_visual_shape_properties.rb on lines 2..13

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

    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