Skip to content

Use multiple functions instead of a switch statement

Codecov / codecov/patch failed Jun 30, 2023 in 1s

51.85% of diff hit (target 87.21%)

View this Pull Request on Codecov

51.85% of diff hit (target 87.21%)

Annotations

Check warning on line 289 in src/api/app/controllers/webui/request_controller.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/controllers/webui/request_controller.rb#L289

Added line #L289 was not covered by tests

Check warning on line 301 in src/api/app/controllers/webui/request_controller.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/controllers/webui/request_controller.rb#L301

Added line #L301 was not covered by tests

Check warning on line 311 in src/api/app/controllers/webui/request_controller.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/controllers/webui/request_controller.rb#L311

Added line #L311 was not covered by tests

Check warning on line 317 in src/api/app/controllers/webui/request_controller.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/controllers/webui/request_controller.rb#L317

Added line #L317 was not covered by tests

Check warning on line 494 in src/api/app/controllers/webui/request_controller.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/controllers/webui/request_controller.rb#L494

Added line #L494 was not covered by tests

Check warning on line 868 in src/api/app/models/bs_request_action.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action.rb#L868

Added line #L868 was not covered by tests

Check warning on line 5 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L5

Added line #L5 was not covered by tests

Check warning on line 9 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L9

Added line #L9 was not covered by tests

Check warning on line 13 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L13

Added line #L13 was not covered by tests

Check warning on line 17 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L17

Added line #L17 was not covered by tests

Check warning on line 21 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L21

Added line #L21 was not covered by tests

Check warning on line 27 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L27

Added line #L27 was not covered by tests

Check warning on line 31 in src/api/app/models/bs_request_action_tab_visibility.rb

See this annotation in the file changed.

@codecov codecov / codecov/patch

src/api/app/models/bs_request_action_tab_visibility.rb#L31

Added line #L31 was not covered by tests