BookingSync/bookingsync-api

View on GitHub

Showing 18 of 26 total issues

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

  class Client
    module Payments
      # List payments
      #
      # Returns payments for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/payments.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module Seasons
      # List seasons
      #
      # Returns seasons for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/seasons.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module Bedrooms
      # List bedrooms
      #
      # Returns bedrooms for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/bedrooms.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module Bathrooms
      # List bathrooms
      #
      # Returns bathrooms for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/bathrooms.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module Periods
      # List periods
      #
      # Returns periods for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/periods.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module LivingRooms
      # List living_rooms
      #
      # Returns living_rooms for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/living_rooms.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module  RatesRules
      # List rates rules
      #
      # Returns rates rules for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/rates_rules.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62
lib/bookingsync/api/client/special_offers.rb on lines 2..62

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

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

  class Client
    module SpecialOffers
      # List special_offers
      #
      # Returns special offers for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/special_offers.rb and 7 other locations - About 1 hr to fix
lib/bookingsync/api/client/bathrooms.rb on lines 2..61
lib/bookingsync/api/client/bedrooms.rb on lines 2..61
lib/bookingsync/api/client/living_rooms.rb on lines 2..61
lib/bookingsync/api/client/payments.rb on lines 2..60
lib/bookingsync/api/client/periods.rb on lines 2..62
lib/bookingsync/api/client/rates_rules.rb on lines 2..62
lib/bookingsync/api/client/seasons.rb on lines 2..62

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

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

  class Client
    module  RatesTables
      # List rates table
      #
      # Returns rates tables for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/rates_tables.rb and 1 other location - About 1 hr to fix
lib/bookingsync/api/client/contacts.rb on lines 2..59

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

  class Client
    module Contacts
      # List contacts
      #
      # Returns contacts for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/contacts.rb and 1 other location - About 1 hr to fix
lib/bookingsync/api/client/rates_tables.rb on lines 2..60

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

  class Client
    module Reviews
      # List reviews
      #
      # Returns reviews for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/reviews.rb and 1 other location - About 1 hr to fix
lib/bookingsync/api/client/review_replies.rb on lines 2..49

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

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

  class Client
    module ReviewReplies
      # List review replies
      #
      # Returns review replies for the account user is authenticated with.
Severity: Major
Found in lib/bookingsync/api/client/review_replies.rb and 1 other location - About 1 hr to fix
lib/bookingsync/api/client/reviews.rb on lines 2..49

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

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

  class Client
    module Clients
      # List clients
      #
      # Returns clients for the account user is authenticated with.
Severity: Minor
Found in lib/bookingsync/api/client/clients.rb and 1 other location - About 55 mins to fix
lib/bookingsync/api/client/sources.rb on lines 2..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 45.

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

  class Client
    module  Sources
      # List sources
      #
      # Returns sources for the account user is authenticated with.
Severity: Minor
Found in lib/bookingsync/api/client/sources.rb and 1 other location - About 55 mins to fix
lib/bookingsync/api/client/clients.rb on lines 2..50

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

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

  class Client
    module RentalsFees
      # List rentals fees
      #
      # Returns rentals fees for the account user is authenticated with.
Severity: Minor
Found in lib/bookingsync/api/client/rentals_fees.rb and 1 other location - About 35 mins to fix
lib/bookingsync/api/client/inquiries.rb on lines 2..32

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

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

  class Client
    module Inquiries
      # List inquiries
      #
      # Return list of inquiries for current account.
Severity: Minor
Found in lib/bookingsync/api/client/inquiries.rb and 1 other location - About 35 mins to fix
lib/bookingsync/api/client/rentals_fees.rb on lines 2..39

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

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

  class Client
    module Applications
      # List applications
      #
      # Returns all applications supported in BookingSync.
Severity: Minor
Found in lib/bookingsync/api/client/applications.rb and 1 other location - About 25 mins to fix
lib/bookingsync/api/client/nightly_rate_maps.rb on lines 2..39

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

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

  class Client
    module NightlyRateMaps
      # List nightly_rate_maps
      #
      # Returns nightly_rate_maps for the rentals of the account, user is authenticated with.
Severity: Minor
Found in lib/bookingsync/api/client/nightly_rate_maps.rb and 1 other location - About 25 mins to fix
lib/bookingsync/api/client/applications.rb on lines 2..39

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

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