coding-chimp/onesignal

View on GitHub

Showing 120 of 673 total issues

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/notification_with_meta.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/filter.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/operator.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/get_notification_request_body.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/app.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/filter_expressions.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/basic_notification.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/player_notification_target.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/outcome_data.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/basic_notification_all_of.rb on lines 286..305
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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

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

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

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

Refactorings

Further Reading

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

    class EnumAttributeValidator
      attr_reader :datatype
      attr_reader :allowable_values

      def initialize(datatype, allowable_values)
Severity: Major
Found in lib/onesignal/models/basic_notification_all_of.rb and 13 other locations - About 35 mins to fix
lib/onesignal/models/app.rb on lines 107..126
lib/onesignal/models/basic_notification.rb on lines 326..345
lib/onesignal/models/filter.rb on lines 30..49
lib/onesignal/models/filter_expressions.rb on lines 33..52
lib/onesignal/models/get_notification_request_body.rb on lines 26..45
lib/onesignal/models/notification.rb on lines 329..348
lib/onesignal/models/notification_target.rb on lines 58..77
lib/onesignal/models/notification_with_meta.rb on lines 357..376
lib/onesignal/models/operator.rb on lines 21..40
lib/onesignal/models/outcome_data.rb on lines 24..43
lib/onesignal/models/player_notification_target.rb on lines 52..71
lib/onesignal/models/subscription_object.rb on lines 52..71
lib/onesignal/models/update_live_activity_request.rb on lines 28..47

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

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.openapi_types
      {
        :'included_segments' => :'Array<String>',
        :'excluded_segments' => :'Array<String>',
        :'include_player_ids' => :'Array<String>',
Severity: Minor
Found in lib/onesignal/models/notification_target.rb and 1 other location - About 30 mins to fix
lib/onesignal/models/notification_target.rb on lines 81..96

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

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: Minor
Found in lib/onesignal/models/notification_target.rb and 1 other location - About 30 mins to fix
lib/onesignal/models/notification_target.rb on lines 106..121

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

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

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

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

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

Refactorings

Further Reading

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

    def relation=(relation)
      validator = EnumAttributeValidator.new('String', [">", "<", "=", "!=", "exists", "not_exists", "time_elapsed_gt", "time_elapsed_lt"])
      unless validator.valid?(relation)
        fail ArgumentError, "invalid value for \"relation\", must be one of #{validator.allowable_values}."
      end
Severity: Minor
Found in lib/onesignal/models/filter_expressions.rb and 1 other location - About 20 mins to fix
lib/onesignal/models/filter.rb on lines 142..147

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

    def self.openapi_types
      {
        :'include_player_ids' => :'Array<String>',
        :'include_external_user_ids' => :'Array<String>',
        :'include_email_tokens' => :'Array<String>',
Severity: Minor
Found in lib/onesignal/models/player_notification_target.rb and 1 other location - About 20 mins to fix
lib/onesignal/models/player_notification_target.rb on lines 75..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

    def self.attribute_map
      {
        :'include_player_ids' => :'include_player_ids',
        :'include_external_user_ids' => :'include_external_user_ids',
        :'include_email_tokens' => :'include_email_tokens',
Severity: Minor
Found in lib/onesignal/models/player_notification_target.rb and 1 other location - About 20 mins to fix
lib/onesignal/models/player_notification_target.rb on lines 98..111

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

    def relation=(relation)
      validator = EnumAttributeValidator.new('String', [">", "<", "=", "!=", "exists", "not_exists", "time_elapsed_gt", "time_elapsed_lt"])
      unless validator.valid?(relation)
        fail ArgumentError, "invalid value for \"relation\", must be one of #{validator.allowable_values}."
      end
Severity: Minor
Found in lib/onesignal/models/filter.rb and 1 other location - About 20 mins to fix
lib/onesignal/models/filter_expressions.rb on lines 173..178

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

    def self.attribute_map
      {
        :'tags' => :'tags',
        :'language' => :'language',
        :'timezone_id' => :'timezone_id',
Severity: Minor
Found in lib/onesignal/models/properties_object.rb and 3 other locations - About 15 mins to fix
lib/onesignal/models/notification_with_meta_all_of.rb on lines 51..63
lib/onesignal/models/notification_with_meta_all_of.rb on lines 73..85
lib/onesignal/models/properties_object.rb on lines 63..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    def self.openapi_types
      {
        :'remaining' => :'Integer',
        :'successful' => :'Integer',
        :'failed' => :'Integer',
Severity: Minor
Found in lib/onesignal/models/notification_with_meta_all_of.rb and 3 other locations - About 15 mins to fix
lib/onesignal/models/notification_with_meta_all_of.rb on lines 51..63
lib/onesignal/models/properties_object.rb on lines 41..53
lib/onesignal/models/properties_object.rb on lines 63..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    def self.openapi_types
      {
        :'tags' => :'Hash<String, Object>',
        :'language' => :'String',
        :'timezone_id' => :'String',
Severity: Minor
Found in lib/onesignal/models/properties_object.rb and 3 other locations - About 15 mins to fix
lib/onesignal/models/notification_with_meta_all_of.rb on lines 51..63
lib/onesignal/models/notification_with_meta_all_of.rb on lines 73..85
lib/onesignal/models/properties_object.rb on lines 41..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    def self.attribute_map
      {
        :'remaining' => :'remaining',
        :'successful' => :'successful',
        :'failed' => :'failed',
Severity: Minor
Found in lib/onesignal/models/notification_with_meta_all_of.rb and 3 other locations - About 15 mins to fix
lib/onesignal/models/notification_with_meta_all_of.rb on lines 73..85
lib/onesignal/models/properties_object.rb on lines 41..53
lib/onesignal/models/properties_object.rb on lines 63..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language