Showing 5 of 29 total issues
Method stormpath_rails_routes
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def stormpath_rails_routes(actions: {})
actions = STORMPATH_DEFAULT_ACTIONS_MAP.merge(actions)
constraints Stormpath::Rails::RoutingConstraint do
if Stormpath::Rails.config.web.register.enabled
- 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 stormpath_rails_routes
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stormpath_rails_routes(actions: {})
actions = STORMPATH_DEFAULT_ACTIONS_MAP.merge(actions)
constraints Stormpath::Rails::RoutingConstraint do
if Stormpath::Rails.config.web.register.enabled
Method call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def call
response.headers['Cache-Control'] = 'no-store'
response.headers['Pragma'] = 'no-cache'
case grant_type
- 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 check_env_variable_names
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.check_env_variable_names
unless Stormpath::Rails::EnvNamesWarning.test_missing_required_env_vars.empty?
warn_message = "\n\n"
40.times { warn_message << '*' }
warn_message << 'STORMPATH RAILS'
- 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 call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def call
begin
if id_site_result.status == 'LOGOUT'
TokenAndCookiesCleaner.new(cookies).remove
elsif id_site_result.status == 'AUTHENTICATED'
- 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"