src/frontend/packages/cloud-foundry/src/store/reducers/cf-users-roles.reducer.ts
Function cfUsersRolesReducer
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function cfUsersRolesReducer(state: UsersRolesState = defaultState, action: Action): UsersRolesState {
switch (action.type) {
case UsersRolesActions.SetUsers:
const setUsersAction = action as UsersRolesSetUsers;
const orgGuid = state.newRoles ? state.newRoles.orgGuid : '';
Function setRole
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
existingState: UsersRolesState,
orgGuid: string,
orgName: string,
spaceGuid: string,
spaceName: string,
Function setSpaceRole
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
orgRoles: IUserPermissionInOrg,
orgGuid: string,
orgName: string,
spaceGuid: string,
spaceName: string,
Avoid too many return
statements within this function. Open
Open
return {
...state,
isSetByUsername: isSetByUsernameAction.isSetByUsername
};
Avoid too many return
statements within this function. Open
Open
return {
...state,
changedRoles: setChangesAction.changes
};
Avoid too many return
statements within this function. Open
Open
return state;
Avoid too many return
statements within this function. Open
Open
return {
...state,
isRemove: isRemoveAction.isRemove
};