summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth/ldap/config.rb
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2019-02-08 14:19:53 +0200
committerAndrew Newdigate <andrew@gitlab.com>2019-03-06 17:51:56 +0200
commit3288e1a874ec0184f9f27f932748e51c57babf17 (patch)
tree9f8667f5349ecfc59f3c8a6e9641cb1e32fa3d5b /lib/gitlab/auth/ldap/config.rb
parent7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (diff)
downloadgitlab-ce-3288e1a874ec0184f9f27f932748e51c57babf17.tar.gz
Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
Diffstat (limited to 'lib/gitlab/auth/ldap/config.rb')
-rw-r--r--lib/gitlab/auth/ldap/config.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth/ldap/config.rb b/lib/gitlab/auth/ldap/config.rb
index dddba85e629..47d63eb53cf 100644
--- a/lib/gitlab/auth/ldap/config.rb
+++ b/lib/gitlab/auth/ldap/config.rb
@@ -195,7 +195,7 @@ module Gitlab
def encryption_options
method = translate_method
- return nil unless method
+ return unless method
{
method: method,
@@ -211,7 +211,7 @@ module Gitlab
return @tls_options if defined?(@tls_options)
method = translate_method
- return nil unless method
+ return unless method
opts = if options['verify_certificates'] && method != 'plain'
# Dup so we don't accidentally overwrite the constant