app/helpers/info_request_helper.rb
File info_request_helper.rb
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
Wontfix
module InfoRequestHelper
include ConfigHelper
include DateTimeHelper
include LinkToHelper
Method status_text_waiting_response_very_overdue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
def status_text_waiting_response_very_overdue(info_request, _opts = {})
str = _('Response to this request is <strong>long overdue</strong>.')
str += ' '
if info_request.public_body.not_subject_to_law?
str += _('Although not legally required to do so, we would have ' \
Method status_text_waiting_clarification
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def status_text_waiting_clarification(info_request, opts = {})
is_owning_user = opts.fetch(:is_owning_user)
str = ''.html_safe
Method status_text_waiting_clarification
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def status_text_waiting_clarification(info_request, opts = {})
is_owning_user = opts.fetch(:is_owning_user)
str = ''.html_safe
- 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"