From 3288e1a874ec0184f9f27f932748e51c57babf17 Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Fri, 8 Feb 2019 14:19:53 +0200 Subject: Adds the Rubocop ReturnNil cop This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points --- app/services/application_settings/update_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/services/application_settings') diff --git a/app/services/application_settings/update_service.rb b/app/services/application_settings/update_service.rb index 2e4643ed668..9146eb96533 100644 --- a/app/services/application_settings/update_service.rb +++ b/app/services/application_settings/update_service.rb @@ -38,7 +38,7 @@ module ApplicationSettings def performance_bar_allowed_group_id performance_bar_enabled = !params.key?(:performance_bar_enabled) || params.delete(:performance_bar_enabled) group_full_path = params.delete(:performance_bar_allowed_group_path) - return nil unless Gitlab::Utils.to_boolean(performance_bar_enabled) + return unless Gitlab::Utils.to_boolean(performance_bar_enabled) Group.find_by_full_path(group_full_path)&.id if group_full_path.present? end -- cgit v1.2.3