Showing 553 of 673 total issues
Method server_url
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def server_url(index, variables = {}, servers = nil)
servers = server_settings if servers == nil
# check array index out of bound
if (index < 0 || index >= servers.size)
- 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 update_subscription_with_http_info
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_subscription_with_http_info(app_id, subscription_id, update_subscription_request_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_subscription ...'
end
# verify the required parameter 'app_id' is set
Method identify_user_by_subscription_id_with_http_info
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def identify_user_by_subscription_id_with_http_info(app_id, subscription_id, user_identity_request_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.identify_user_by_subscription_id ...'
end
# verify the required parameter 'app_id' is set
Method transfer_subscription_with_http_info
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.transfer_subscription ...'
end
# verify the required parameter 'app_id' is set
Method begin_live_activity_with_http_info
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def begin_live_activity_with_http_info(app_id, activity_id, begin_live_activity_request, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.begin_live_activity ...'
end
# verify the required parameter 'app_id' is set
Method update_live_activity_with_http_info
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_live_activity_with_http_info(app_id, activity_id, update_live_activity_request, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_live_activity ...'
end
# verify the required parameter 'app_id' is set
Method delete_alias_with_http_info
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.delete_alias ...'
end
# verify the required parameter 'app_id' is set
Method openapi_types
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.openapi_types
{
:'id' => :'String',
:'name' => :'String',
:'players' => :'Integer',
Method ==
has 36 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 &&
name == o.name &&
Method attribute_map
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.attribute_map
{
:'id' => :'id',
:'name' => :'name',
:'players' => :'players',
Method get_notifications_with_http_info
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_notifications_with_http_info(app_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.get_notifications ...'
end
# verify the required parameter 'app_id' is set
Method get_outcomes_with_http_info
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_outcomes_with_http_info(app_id, outcome_names, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.get_outcomes ...'
end
# verify the required parameter 'app_id' is set
Method get_notification_history_with_http_info
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_notification_history_with_http_info(notification_id, get_notification_request_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.get_notification_history ...'
end
# verify the required parameter 'notification_id' is set
Method create_user_with_http_info
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_user_with_http_info(app_id, user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.create_user ...'
end
# verify the required parameter 'app_id' is set
Method update_player_with_http_info
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_player_with_http_info(player_id, player, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_player ...'
end
# verify the required parameter 'player_id' is set
Method update_app_with_http_info
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_app_with_http_info(app_id, app, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_app ...'
end
# verify the required parameter 'app_id' is set
Method update_player_tags_with_http_info
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update_player_tags_with_http_info(app_id, external_user_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_player_tags ...'
end
# verify the required parameter 'app_id' is set
Method _deserialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _deserialize(type, value)
case type.to_sym
when :Time
Time.parse(value)
when :Date
Method _deserialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _deserialize(type, value)
case type.to_sym
when :Time
Time.parse(value)
when :Date
Method _deserialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _deserialize(type, value)
case type.to_sym
when :Time
Time.parse(value)
when :Date