coding-chimp/onesignal

View on GitHub

Showing 120 of 673 total issues

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

          included_segments == o.included_segments &&
          excluded_segments == o.excluded_segments &&
          include_player_ids == o.include_player_ids &&
          include_external_user_ids == o.include_external_user_ids &&
          include_email_tokens == o.include_email_tokens &&
Severity: Major
Found in lib/onesignal/models/notification.rb and 1 other location - About 2 days to fix
lib/onesignal/models/notification_with_meta.rb on lines 1304..1411

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

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

          include_chrome_web_reg_ids == o.include_chrome_web_reg_ids &&
          include_android_reg_ids == o.include_android_reg_ids &&
          include_aliases == o.include_aliases &&
          target_channel == o.target_channel &&
          id == o.id &&
Severity: Major
Found in lib/onesignal/models/notification_with_meta.rb and 1 other location - About 2 days to fix
lib/onesignal/models/notification.rb on lines 1200..1307

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

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 OneSignal
  class NotificationSlice
    attr_accessor :total_count

    attr_accessor :offset
Severity: Major
Found in lib/onesignal/models/notification_slice.rb and 1 other location - About 1 day to fix
lib/onesignal/models/player_slice.rb on lines 16..243

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

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 OneSignal
  class PlayerSlice
    attr_accessor :total_count

    attr_accessor :offset
Severity: Major
Found in lib/onesignal/models/player_slice.rb and 1 other location - About 1 day to fix
lib/onesignal/models/notification_slice.rb on lines 16..243

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

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 OneSignal
  class CreateUserConflictResponseErrorsInner
    attr_accessor :code

    attr_accessor :title
lib/onesignal/models/basic_notification_all_of_android_background_layout.rb on lines 16..236

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

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 OneSignal
  # Channel: Push Notifications Platform: Android Allowing setting a background image for the notification. This is a JSON object containing the following keys. See our Background Image documentation for image sizes. 
  class BasicNotificationAllOfAndroidBackgroundLayout
    # Asset file, android resource name, or URL to remote image.
    attr_accessor :image
lib/onesignal/models/create_user_conflict_response_errors_inner.rb on lines 16..232

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

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 OneSignal
  class SegmentNotificationTarget
    # The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] 
    attr_accessor :included_segments

Severity: Major
Found in lib/onesignal/models/segment_notification_target.rb and 1 other location - About 1 day to fix
lib/onesignal/models/invalid_identifier_error.rb on lines 16..229

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

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 OneSignal
  class InvalidIdentifierError
    # Returned if using include_external_user_ids
    attr_accessor :invalid_external_user_ids

Severity: Major
Found in lib/onesignal/models/invalid_identifier_error.rb and 1 other location - About 1 day to fix
lib/onesignal/models/segment_notification_target.rb on lines 16..229

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

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

module OneSignal
  class CreateSubscriptionRequestBody
    attr_accessor :subscription

    attr_accessor :retain_previous_owner
Severity: Major
Found in lib/onesignal/models/create_subscription_request_body.rb and 5 other locations - About 1 day to fix
lib/onesignal/models/create_player_success_response.rb on lines 16..223
lib/onesignal/models/create_segment_success_response.rb on lines 16..224
lib/onesignal/models/generic_error_errors_inner.rb on lines 16..223
lib/onesignal/models/notification_history_success_response.rb on lines 16..223
lib/onesignal/models/update_live_activity_success_response.rb on lines 16..223

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

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

module OneSignal
  class GenericErrorErrorsInner
    attr_accessor :code

    attr_accessor :title
Severity: Major
Found in lib/onesignal/models/generic_error_errors_inner.rb and 5 other locations - About 1 day to fix
lib/onesignal/models/create_player_success_response.rb on lines 16..223
lib/onesignal/models/create_segment_success_response.rb on lines 16..224
lib/onesignal/models/create_subscription_request_body.rb on lines 16..223
lib/onesignal/models/notification_history_success_response.rb on lines 16..223
lib/onesignal/models/update_live_activity_success_response.rb on lines 16..223

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

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

module OneSignal
  class UpdateLiveActivitySuccessResponse
    attr_accessor :notification_id

    attr_accessor :errors
lib/onesignal/models/create_player_success_response.rb on lines 16..223
lib/onesignal/models/create_segment_success_response.rb on lines 16..224
lib/onesignal/models/create_subscription_request_body.rb on lines 16..223
lib/onesignal/models/generic_error_errors_inner.rb on lines 16..223
lib/onesignal/models/notification_history_success_response.rb on lines 16..223

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

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

module OneSignal
  class CreatePlayerSuccessResponse
    attr_accessor :success

    attr_accessor :id
Severity: Major
Found in lib/onesignal/models/create_player_success_response.rb and 5 other locations - About 1 day to fix
lib/onesignal/models/create_segment_success_response.rb on lines 16..224
lib/onesignal/models/create_subscription_request_body.rb on lines 16..223
lib/onesignal/models/generic_error_errors_inner.rb on lines 16..223
lib/onesignal/models/notification_history_success_response.rb on lines 16..223
lib/onesignal/models/update_live_activity_success_response.rb on lines 16..223

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

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

module OneSignal
  class NotificationHistorySuccessResponse
    attr_accessor :success

    attr_accessor :destination_url
lib/onesignal/models/create_player_success_response.rb on lines 16..223
lib/onesignal/models/create_segment_success_response.rb on lines 16..224
lib/onesignal/models/create_subscription_request_body.rb on lines 16..223
lib/onesignal/models/generic_error_errors_inner.rb on lines 16..223
lib/onesignal/models/update_live_activity_success_response.rb on lines 16..223

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

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

module OneSignal
  class CreateSegmentSuccessResponse
    attr_accessor :success

    # UUID of created segment
Severity: Major
Found in lib/onesignal/models/create_segment_success_response.rb and 5 other locations - About 1 day to fix
lib/onesignal/models/create_player_success_response.rb on lines 16..223
lib/onesignal/models/create_subscription_request_body.rb on lines 16..223
lib/onesignal/models/generic_error_errors_inner.rb on lines 16..223
lib/onesignal/models/notification_history_success_response.rb on lines 16..223
lib/onesignal/models/update_live_activity_success_response.rb on lines 16..223

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

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

module OneSignal
  class RateLimiterError
    attr_accessor :errors

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/rate_limiter_error.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/create_user_conflict_response.rb on lines 16..216
lib/onesignal/models/generic_error.rb on lines 16..216
lib/onesignal/models/inline_response200.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_response.rb on lines 16..216

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

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

module OneSignal
  class CreateUserConflictResponse
    attr_accessor :errors

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/create_user_conflict_response.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/generic_error.rb on lines 16..216
lib/onesignal/models/inline_response200.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/rate_limiter_error.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_response.rb on lines 16..216

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

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

module OneSignal
  class UserIdentityResponse
    attr_accessor :identity

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/user_identity_response.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/create_user_conflict_response.rb on lines 16..216
lib/onesignal/models/generic_error.rb on lines 16..216
lib/onesignal/models/inline_response200.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/rate_limiter_error.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_request_body.rb on lines 16..216

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

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

module OneSignal
  class GenericError
    attr_accessor :errors

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/generic_error.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/create_user_conflict_response.rb on lines 16..216
lib/onesignal/models/inline_response200.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/rate_limiter_error.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_response.rb on lines 16..216

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

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

module OneSignal
  class InlineResponse200
    attr_accessor :identity

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/inline_response200.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/create_user_conflict_response.rb on lines 16..216
lib/onesignal/models/generic_error.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/rate_limiter_error.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_response.rb on lines 16..216

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

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

module OneSignal
  class UserIdentityRequestBody
    attr_accessor :identity

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/user_identity_request_body.rb and 9 other locations - About 1 day to fix
lib/onesignal/models/create_user_conflict_response.rb on lines 16..216
lib/onesignal/models/generic_error.rb on lines 16..216
lib/onesignal/models/inline_response200.rb on lines 16..216
lib/onesignal/models/inline_response2003.rb on lines 16..216
lib/onesignal/models/outcomes_data.rb on lines 16..216
lib/onesignal/models/player_notification_target_include_aliases.rb on lines 16..216
lib/onesignal/models/rate_limiter_error.rb on lines 16..216
lib/onesignal/models/transfer_subscription_request_body.rb on lines 16..216
lib/onesignal/models/user_identity_response.rb on lines 16..216

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

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