summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Elastic/Search/FakeCGI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Elastic/Search/FakeCGI.pm')
-rw-r--r--Bugzilla/Elastic/Search/FakeCGI.pm33
1 files changed, 18 insertions, 15 deletions
diff --git a/Bugzilla/Elastic/Search/FakeCGI.pm b/Bugzilla/Elastic/Search/FakeCGI.pm
index 827c96c52..9772d798c 100644
--- a/Bugzilla/Elastic/Search/FakeCGI.pm
+++ b/Bugzilla/Elastic/Search/FakeCGI.pm
@@ -13,31 +13,34 @@ has 'params' => (is => 'ro', default => sub { {} });
# we pretend to be Bugzilla::CGI at times.
sub canonicalise_query {
- return Bugzilla::CGI::canonicalise_query(@_);
+ return Bugzilla::CGI::canonicalise_query(@_);
}
sub delete {
- my ($self, $key) = @_;
- delete $self->params->{$key};
+ my ($self, $key) = @_;
+ delete $self->params->{$key};
}
sub redirect {
- my ($self, @args) = @_;
+ my ($self, @args) = @_;
- Bugzilla::Elastic::Search::Redirect->throw(redirect_args => \@args);
+ Bugzilla::Elastic::Search::Redirect->throw(redirect_args => \@args);
}
sub param {
- my ($self, $key, $val, @rest) = @_;
- if (@_ > 3) {
- $self->params->{$key} = [$val, @rest];
- } elsif (@_ == 3) {
- $self->params->{$key} = $val;
- } elsif (@_ == 2) {
- return $self->params->{$key};
- } else {
- return $self->params
- }
+ my ($self, $key, $val, @rest) = @_;
+ if (@_ > 3) {
+ $self->params->{$key} = [$val, @rest];
+ }
+ elsif (@_ == 3) {
+ $self->params->{$key} = $val;
+ }
+ elsif (@_ == 2) {
+ return $self->params->{$key};
+ }
+ else {
+ return $self->params;
+ }
}
1;