From 8ec8da0491ad89604700b3e29a227966f6d84ba1 Mon Sep 17 00:00:00 2001 From: Perl Tidy Date: Wed, 5 Dec 2018 15:38:52 -0500 Subject: no bug - reformat all the code using the new perltidy rules --- Bugzilla/WebService/Elastic.pm | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'Bugzilla/WebService/Elastic.pm') diff --git a/Bugzilla/WebService/Elastic.pm b/Bugzilla/WebService/Elastic.pm index 3a33a1dba..373f6db58 100644 --- a/Bugzilla/WebService/Elastic.pm +++ b/Bugzilla/WebService/Elastic.pm @@ -30,30 +30,28 @@ use Bugzilla::Error; use Bugzilla::WebService::Util qw(validate); use Bugzilla::Util qw(trim detaint_natural trick_taint); -use constant READ_ONLY => qw( suggest_users ); +use constant READ_ONLY => qw( suggest_users ); use constant PUBLIC_METHODS => qw( suggest_users ); sub suggest_users { - my ($self, $params) = @_; + my ($self, $params) = @_; - Bugzilla->switch_to_shadow_db(); + Bugzilla->switch_to_shadow_db(); - ThrowCodeError('params_required', { function => 'Elastic.suggest_users', params => ['match'] }) - unless defined $params->{match}; + ThrowCodeError('params_required', + {function => 'Elastic.suggest_users', params => ['match']}) + unless defined $params->{match}; - ThrowUserError('user_access_by_match_denied') - unless Bugzilla->user->id; + ThrowUserError('user_access_by_match_denied') unless Bugzilla->user->id; - trick_taint($params->{match}); - my $results = Bugzilla->elastic->suggest_users($params->{match} . ""); - my @users = map { - { - real_name => $self->type(string => $_->{real_name}), - name => $self->type(email => $_->{name}), - } - } @$results; + trick_taint($params->{match}); + my $results = Bugzilla->elastic->suggest_users($params->{match} . ""); + my @users = map { { + real_name => $self->type(string => $_->{real_name}), + name => $self->type(email => $_->{name}), + } } @$results; - return { users => \@users }; + return {users => \@users}; } -1; \ No newline at end of file +1; -- cgit v1.2.3-24-g4f1b