rosa-abf/rosa-build

View on GitHub
app/presenters/statistic_presenter.rb

Summary

Maintainability
A
1 hr
Test Coverage

Showing 3 of 3 total issues

Method as_json has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def as_json(options = nil)
{
build_lists: {
build_started: prepare_collection(build_lists_started),
success: prepare_collection(build_lists_success),
Severity: Minor
Found in app/presenters/statistic_presenter.rb - About 1 hr to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    issues: {
    open: prepare_collection(issues_open),
    reopen: prepare_collection(issues_reopen),
    closed: prepare_collection(issues_closed),
     
     
    Severity: Minor
    Found in app/presenters/statistic_presenter.rb and 1 other location - About 15 mins to fix
    app/presenters/statistic_presenter.rb on lines 38..46

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    pull_requests: {
    open: prepare_collection(pull_requests_open),
    merged: prepare_collection(pull_requests_merged),
    closed: prepare_collection(pull_requests_closed),
     
     
    Severity: Minor
    Found in app/presenters/statistic_presenter.rb and 1 other location - About 15 mins to fix
    app/presenters/statistic_presenter.rb on lines 29..37

    There are no issues that match your filters.

    Category
    Status