coding-chimp/onesignal

View on GitHub

Showing 120 of 673 total issues

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 OutcomesData
    attr_accessor :outcomes

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/outcomes_data.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/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 TransferSubscriptionRequestBody
    attr_accessor :identity

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/transfer_subscription_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/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 InlineResponse2003
    attr_accessor :in_app_messages

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/inline_response2003.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/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 15 locations. Consider refactoring.
Open

module OneSignal
  class DeleteSegmentNotFoundResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/delete_segment_not_found_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class UpdatePlayerTagsRequestBody
    # Custom tags for the device record.  Only support string key value pairs.  Does not support arrays or other nested objects.  Example `{\"foo\":\"bar\",\"this\":\"that\"}`. Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of ata Please consider using your own Database to save more than 1 kilobyte of data.  See: Internal Database & CRM 
    attr_accessor :tags

Severity: Major
Found in lib/onesignal/models/update_player_tags_request_body.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class UserSubscriptionOptions
    attr_accessor :retain_previous_owner

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/user_subscription_options.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214

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

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

module OneSignal
  class CreateUserConflictResponseErrorsItemsMeta
    attr_accessor :conflicting_aliases

    # Attribute mapping from ruby-style variable name to JSON key.
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class ExportEventsSuccessResponse
    attr_accessor :csv_file_url

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/export_events_success_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class UpdateSubscriptionRequestBody
    attr_accessor :subscription

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/update_subscription_request_body.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class InlineResponse202
    attr_accessor :properties

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/inline_response202.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class InlineResponse201
    attr_accessor :subscription

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/inline_response201.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class CancelNotificationSuccessResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class DeletePlayerNotFoundResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/delete_player_not_found_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class DeleteSegmentSuccessResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/delete_segment_success_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class ExportPlayersSuccessResponse
    attr_accessor :csv_file_url

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/export_players_success_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class UpdatePlayerSuccessResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/update_player_success_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class UpdatePlayerTagsSuccessResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_player_success_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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

module OneSignal
  class DeletePlayerSuccessResponse
    attr_accessor :success

    # Attribute mapping from ruby-style variable name to JSON key.
Severity: Major
Found in lib/onesignal/models/delete_player_success_response.rb and 14 other locations - About 1 day to fix
lib/onesignal/models/cancel_notification_success_response.rb on lines 16..214
lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb on lines 16..214
lib/onesignal/models/delete_player_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_not_found_response.rb on lines 16..214
lib/onesignal/models/delete_segment_success_response.rb on lines 16..214
lib/onesignal/models/export_events_success_response.rb on lines 16..214
lib/onesignal/models/export_players_success_response.rb on lines 16..214
lib/onesignal/models/inline_response201.rb on lines 16..214
lib/onesignal/models/inline_response202.rb on lines 16..214
lib/onesignal/models/update_player_success_response.rb on lines 16..214
lib/onesignal/models/update_player_tags_request_body.rb on lines 16..215
lib/onesignal/models/update_player_tags_success_response.rb on lines 16..214
lib/onesignal/models/update_subscription_request_body.rb on lines 16..214
lib/onesignal/models/user_subscription_options.rb on lines 16..214

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

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 self.attribute_map
      {
        :'included_segments' => :'included_segments',
        :'excluded_segments' => :'excluded_segments',
        :'include_player_ids' => :'include_player_ids',
Severity: Major
Found in lib/onesignal/models/notification_with_meta.rb and 1 other location - About 7 hrs to fix
lib/onesignal/models/notification_with_meta.rb on lines 508..626

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

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