rosa-abf/rosa-build

View on GitHub
app/models/collaborator.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Class Collaborator has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

class Collaborator
include ActiveModel::Conversion
include ActiveModel::Validations
include ActiveModel::Serializers::JSON
extend ActiveModel::Naming
Severity: Minor
Found in app/models/collaborator.rb - About 2 hrs to fix

    Method actor_name has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def actor_name
    if @actor.present?
    @actor.instance_of?(User) ? "#{@actor.uname}#{ @actor.try(:name) and !@actor.name.empty? ? " (#{@actor.name})" : ''}" : @actor.uname
    else
    nil
    Severity: Minor
    Found in app/models/collaborator.rb - About 1 hr to fix
    Category
    Status