aitherios/rnfse

View on GitHub

Showing 20 of 25 total issues

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

  def consultar_lote_rps(hash = {})
    validate_options(hash)
    validate_ascii(hash)
    header = xml_builder.build_header_xml()
    parameters = xml_builder.build_consultar_lote_rps_envio_xml(hash)
Severity: Major
Found in lib/rnfse/api/speed_gov_1_0.rb and 3 other locations - About 45 mins to fix
lib/rnfse/api/speed_gov_1_0.rb on lines 22..33
lib/rnfse/api/speed_gov_1_0.rb on lines 50..61
lib/rnfse/api/speed_gov_1_0.rb on lines 64..75

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

  def consultar_nfse(hash = {})
    validate_options(hash)
    validate_ascii(hash)
    header = xml_builder.build_header_xml()
    parameters = xml_builder.build_consultar_nfse_envio_xml(hash)
Severity: Major
Found in lib/rnfse/api/speed_gov_1_0.rb and 3 other locations - About 45 mins to fix
lib/rnfse/api/speed_gov_1_0.rb on lines 22..33
lib/rnfse/api/speed_gov_1_0.rb on lines 36..47
lib/rnfse/api/speed_gov_1_0.rb on lines 50..61

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

  def consultar_nfse_por_rps(hash = {})
    validate_options(hash)
    validate_ascii(hash)
    header = xml_builder.build_header_xml()
    parameters = xml_builder.build_consultar_nfse_rps_envio_xml(hash)
Severity: Major
Found in lib/rnfse/api/speed_gov_1_0.rb and 3 other locations - About 45 mins to fix
lib/rnfse/api/speed_gov_1_0.rb on lines 22..33
lib/rnfse/api/speed_gov_1_0.rb on lines 36..47
lib/rnfse/api/speed_gov_1_0.rb on lines 64..75

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

  def consultar_situacao_lote_rps(hash = {})
    validate_options(hash)
    validate_ascii(hash)
    header = xml_builder.build_header_xml()
    parameters = xml_builder.build_consultar_situacao_lote_rps_envio_xml(hash)
Severity: Major
Found in lib/rnfse/api/speed_gov_1_0.rb and 3 other locations - About 45 mins to fix
lib/rnfse/api/speed_gov_1_0.rb on lines 36..47
lib/rnfse/api/speed_gov_1_0.rb on lines 50..61
lib/rnfse/api/speed_gov_1_0.rb on lines 64..75

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

  def build_consultar_lote_rps_envio_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, /(Prestador|Protocolo)/)
    inner_xml = ::Gyoku.xml(hash, key_converter: :none)
    Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 6..12
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 17..23
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 42..56
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 68..74
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 86..92

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

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

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

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

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

Refactorings

Further Reading

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

  def build_consultar_nfse_envio_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, %r{
                                     (Prestador|
                                      NumeroNfse|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 6..12
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 17..23
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 68..74
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 86..92
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 104..110

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

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

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

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

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

Refactorings

Further Reading

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

  def build_consultar_situacao_lote_rps_envio_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, /(Prestador|Protocolo)/)
    inner_xml = ::Gyoku.xml(hash, key_converter: :none)
    Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 6..12
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 17..23
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 42..56
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 68..74
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 104..110

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

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

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

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

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

Refactorings

Further Reading

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

  def build_recepcionar_lote_rps_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, /LoteRps/)
    inner_xml = ::Gyoku.xml(hash, key_converter: :none)
    Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 17..23
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 42..56
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 68..74
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 86..92
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 104..110

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

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

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

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

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

Refactorings

Further Reading

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

  def build_consultar_situacao_lote_rps_envio_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, /(Prestador|Protocolo)/)
    inner_xml = ::Gyoku.xml(hash, key_converter: :none)
    Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 6..12
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 42..56
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 68..74
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 86..92
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 104..110

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

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

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

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

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

Refactorings

Further Reading

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

  def build_consultar_nfse_rps_envio_xml(hash = {})
    hash = prepare_hash(hash)
    hash = add_p_namespace(hash, /(Prestador|IdentificacaoRps)/)
    inner_xml = ::Gyoku.xml(hash, key_converter: :none)
    Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Severity: Major
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 5 other locations - About 40 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 6..12
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 17..23
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 42..56
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 86..92
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 104..110

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

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

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

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

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

Refactorings

Further Reading

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

  def consultar_nfse_por_rps(hash = {})
    validate_options(hash)
    xml = xml_builder.build_consultar_nfse_por_rps_xml(hash)
    response = self.soap_client.call(
      :consultar_nfse_por_rps,
Severity: Major
Found in lib/rnfse/api/iss_net_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 39..47
lib/rnfse/api/abrasf_1_0.rb on lines 50..58
lib/rnfse/api/abrasf_1_0.rb on lines 61..69
lib/rnfse/api/abrasf_1_0.rb on lines 72..80
lib/rnfse/api/iss_net_1_0.rb on lines 28..36

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

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

      when has_options(options, 'provedor', 'municipio')
        provedor = provedores['producao'][options['provedor'].to_s]
        raise ArgumentError, 'provedor inexistente', caller if provedor.nil?
        self.api = provedor['api']
        load_options_method = :load_options_for_production
Severity: Minor
Found in lib/rnfse/api.rb and 1 other location - About 25 mins to fix
lib/rnfse/api.rb on lines 19..23

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

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

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

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

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

Refactorings

Further Reading

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

    def consultar_nfse_por_rps(hash = {})
      validate_options(hash)
      xml = xml_builder.build_consultar_nfse_por_rps_xml(hash)
      response = self.soap_client.call(
        :consultar_nfse_por_rps,
Severity: Major
Found in lib/rnfse/api/abrasf_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 39..47
lib/rnfse/api/abrasf_1_0.rb on lines 61..69
lib/rnfse/api/abrasf_1_0.rb on lines 72..80
lib/rnfse/api/iss_net_1_0.rb on lines 28..36
lib/rnfse/api/iss_net_1_0.rb on lines 39..47

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

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

      when has_options(options, 'provedor', 'homologacao')
        provedor = provedores['homologacao'][options['provedor'].to_s]
        raise ArgumentError, 'provedor de homologação inexistente', caller if provedor.nil?
        self.api = provedor['api']
        load_options_method = :load_options_for_staging
Severity: Minor
Found in lib/rnfse/api.rb and 1 other location - About 25 mins to fix
lib/rnfse/api.rb on lines 25..29

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

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

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

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

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

Refactorings

Further Reading

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

  def consultar_situacao_lote_rps(hash = {})
    validate_options(hash)
    xml = xml_builder.build_consultar_situacao_lote_rps_xml(hash)
    response = self.soap_client.call(
      :consultar_situacao_lote_rps,
Severity: Major
Found in lib/rnfse/api/iss_net_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 39..47
lib/rnfse/api/abrasf_1_0.rb on lines 50..58
lib/rnfse/api/abrasf_1_0.rb on lines 61..69
lib/rnfse/api/abrasf_1_0.rb on lines 72..80
lib/rnfse/api/iss_net_1_0.rb on lines 39..47

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

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

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

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

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

Refactorings

Further Reading

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

    def consultar_situacao_lote_rps(hash = {})
      validate_options(hash)
      xml = xml_builder.build_consultar_situacao_lote_rps_xml(hash)
      response = self.soap_client.call(
        :consultar_situacao_lote_rps,
Severity: Major
Found in lib/rnfse/api/abrasf_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 50..58
lib/rnfse/api/abrasf_1_0.rb on lines 61..69
lib/rnfse/api/abrasf_1_0.rb on lines 72..80
lib/rnfse/api/iss_net_1_0.rb on lines 28..36
lib/rnfse/api/iss_net_1_0.rb on lines 39..47

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

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

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

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

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

Refactorings

Further Reading

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

    def consultar_lote_rps(hash = {})
      validate_options(hash)
      xml = xml_builder.build_consultar_lote_rps_xml(hash)
      response = self.soap_client.call(
        :consultar_lote_rps,
Severity: Major
Found in lib/rnfse/api/abrasf_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 39..47
lib/rnfse/api/abrasf_1_0.rb on lines 50..58
lib/rnfse/api/abrasf_1_0.rb on lines 61..69
lib/rnfse/api/iss_net_1_0.rb on lines 28..36
lib/rnfse/api/iss_net_1_0.rb on lines 39..47

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

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

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

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

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

Refactorings

Further Reading

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

    def consultar_nfse(hash = {})
      validate_options(hash)
      xml = xml_builder.build_consultar_nfse_xml(hash)
      response = self.soap_client.call(
        :consultar_nfse,
Severity: Major
Found in lib/rnfse/api/abrasf_1_0.rb and 5 other locations - About 25 mins to fix
lib/rnfse/api/abrasf_1_0.rb on lines 39..47
lib/rnfse/api/abrasf_1_0.rb on lines 50..58
lib/rnfse/api/abrasf_1_0.rb on lines 72..80
lib/rnfse/api/iss_net_1_0.rb on lines 28..36
lib/rnfse/api/iss_net_1_0.rb on lines 39..47

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

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 prepare_hash(hash)
      hash = camelize_hash(hash)
      hash = wrap_rps(hash)
      hash = wrap_periodo_emissao(hash)
      hash = wrap_identificacao_nfse(hash)
Severity: Minor
Found in lib/rnfse/xml_builder/abrasf_1_0.rb and 1 other location - About 20 mins to fix
lib/rnfse/xml_builder/speed_gov_1_0.rb on lines 146..155

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

  def prepare_hash(hash)
    hash = camelize_hash(hash)
    hash = wrap_rps(hash)
    hash = clean_numerics(hash)
    hash = alter_aliquota(hash)
Severity: Minor
Found in lib/rnfse/xml_builder/speed_gov_1_0.rb and 1 other location - About 20 mins to fix
lib/rnfse/xml_builder/abrasf_1_0.rb on lines 65..74

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

Severity
Category
Status
Source
Language