cloudfoundry/korifi

View on GitHub
api/repositories/service_plan_repository.go

Summary

Maintainability
A
1 hr
Test Coverage
B
87%

Showing 1 of 1 total issue

Method ServicePlanRepo.planToRecord has 62 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (r *ServicePlanRepo) planToRecord(ctx context.Context, authInfo authorization.Info, plan korifiv1alpha1.CFServicePlan) (ServicePlanRecord, error) {
organizations := []VisibilityOrganization{}
if plan.Spec.Visibility.Type == korifiv1alpha1.OrganizationServicePlanVisibilityType {
var err error
organizations, err = r.toVisibilityOrganizations(ctx, authInfo, plan.Spec.Visibility.Organizations)
Severity: Minor
Found in api/repositories/service_plan_repository.go - About 1 hr to fix
    Category
    Status