From 37722eca39874bb6abdcd120e3e458bd62dea62b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 5 Jul 2017 11:43:18 -0700 Subject: Bug 1377933 - Remove trailing whitespace from all perl files --- Bugzilla/WebService/Server/JSONRPC.pm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Bugzilla/WebService/Server/JSONRPC.pm') diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm index 24ad12730..0fb8b4299 100644 --- a/Bugzilla/WebService/Server/JSONRPC.pm +++ b/Bugzilla/WebService/Server/JSONRPC.pm @@ -167,8 +167,8 @@ sub retrieve_json_from_get { my $params; if (defined $cgi->param('params')) { local $@; - $params = eval { - $self->json->decode(scalar $cgi->param('params')) + $params = eval { + $self->json->decode(scalar $cgi->param('params')) }; if ($@) { ThrowUserError('json_rpc_invalid_params', @@ -195,12 +195,12 @@ sub retrieve_json_from_get { sub type { my ($self, $type, $value) = @_; - + # This is the only type that does something special with undef. if ($type eq 'boolean') { return $value ? JSON::true : JSON::false; } - + return JSON::null if !defined $value; my $retval = $value; @@ -363,7 +363,7 @@ sub _argument_type_check { if (defined $params->{$field}) { my $value = $params->{$field}; if (ref $value eq 'ARRAY') { - $params->{$field} = + $params->{$field} = [ map { $self->datetime_format_inbound($_) } @$value ]; } else { @@ -401,7 +401,7 @@ sub _argument_type_check { # methods that can change data. This protects us against cross-site # request forgeries. if (!grep($_ eq $method, $pkg->READ_ONLY)) { - ThrowUserError('json_rpc_post_only', + ThrowUserError('json_rpc_post_only', { method => $self->_bz_method_name }); } } @@ -415,7 +415,7 @@ sub _argument_type_check { $self->handle_login(); # Bugzilla::WebService packages call internal methods like - # $self->_some_private_method. So we have to inherit from + # $self->_some_private_method. So we have to inherit from # that class as well as this Server class. my $new_class = ref($self) . '::' . $pkg; my $isa_string = 'our @ISA = qw(' . ref($self) . " $pkg)"; @@ -435,7 +435,7 @@ sub _argument_type_check { # _bz_method_name is stored by _find_procedure for later use. sub _bz_method_name { - return $_[0]->{_bz_method_name}; + return $_[0]->{_bz_method_name}; } sub _bz_callback { @@ -502,7 +502,7 @@ L. To connect over GET, simply send the values that you'd normally send for each JSON-RPC argument as URL parameters, with the C item being -a JSON string. +a JSON string. The simplest example is a call to C: @@ -531,10 +531,10 @@ L. To use JSONP with Bugzilla's JSON-RPC WebService, simply specify a C parameter to jsonrpc.cgi when using it via GET as described above. -For example, here's some HTML you could use to get the data from +For example, here's some HTML you could use to get the data from C on a remote website, using JSONP: -