metamaps/metamaps

View on GitHub
app/decorators/notification_decorator.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method has too many lines. [42/10]
Open

    def decorate(notification, receipt)
      result = {
        id: notification.id,
        type: notification.notification_code,
        subject: notification.subject,

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for decorate is too high. [34.91/16]
Open

    def decorate(notification, receipt)
      result = {
        id: notification.id,
        type: notification.notification_code,
        subject: notification.subject,

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method decorate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def decorate(notification, receipt)
      result = {
        id: notification.id,
        type: notification.notification_code,
        subject: notification.subject,
Severity: Minor
Found in app/decorators/notification_decorator.rb - About 1 hr to fix

There are no issues that match your filters.

Category
Status