Showing 553 of 673 total issues
Method initialize
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::StringMap` initialize method"
end
Method initialize
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::PlayerNotificationTarget` initialize method"
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method openapi_types
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_types
{
:'included_segments' => :'Array<String>',
:'excluded_segments' => :'Array<String>',
:'include_player_ids' => :'Array<String>',
Method ==
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
included_segments == o.included_segments &&
excluded_segments == o.excluded_segments &&
Method attribute_map
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.attribute_map
{
:'included_segments' => :'included_segments',
:'excluded_segments' => :'excluded_segments',
:'include_player_ids' => :'include_player_ids',
Method initialize
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::App` initialize method"
end
Method initialize
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::Player` initialize method"
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method attribute_map
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.attribute_map
{
:'included_segments' => :'included_segments',
:'excluded_segments' => :'excluded_segments',
:'include_player_ids' => :'include_player_ids',
Method ==
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
included_segments == o.included_segments &&
excluded_segments == o.excluded_segments &&
Method openapi_types
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_types
{
:'included_segments' => :'Array<String>',
:'excluded_segments' => :'Array<String>',
:'include_player_ids' => :'Array<String>',
Method openapi_types
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_types
{
:'included_segments' => :'Array<String>',
:'excluded_segments' => :'Array<String>',
:'include_player_ids' => :'Array<String>',
Method ==
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
included_segments == o.included_segments &&
excluded_segments == o.excluded_segments &&
Method attribute_map
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.attribute_map
{
:'included_segments' => :'included_segments',
:'excluded_segments' => :'excluded_segments',
:'include_player_ids' => :'include_player_ids',
File player.rb
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'date'
require 'time'
module OneSignal
class Player
Method attribute_map
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.attribute_map
{
:'id' => :'id',
:'value' => :'value',
:'name' => :'name',
Method ==
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
value == o.value &&
Method openapi_types
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_types
{
:'id' => :'String',
:'value' => :'Integer',
:'name' => :'String',
Method initialize
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::Player` initialize method"
end
Method openapi_nullable
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_nullable
Set.new([
:'include_player_ids',
:'include_external_user_ids',
:'include_aliases',
Method openapi_nullable
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_nullable
Set.new([
:'include_player_ids',
:'include_external_user_ids',
:'include_aliases',