diff options
author | 2023-01-30 22:17:13 +0000 | |
---|---|---|
committer | 2023-01-30 22:17:13 +0000 | |
commit | ca51ed9196a30be1a2b03b8b650a28c5f2479c9c (patch) | |
tree | cfc09307ee2eedebd7d300748847aec33e9eeb0c | |
parent | BugUrl: add Gerrit (from Eclipse) (diff) | |
download | bugzilla-ca51ed9196a30be1a2b03b8b650a28c5f2479c9c.tar.gz bugzilla-ca51ed9196a30be1a2b03b8b650a28c5f2479c9c.tar.bz2 bugzilla-ca51ed9196a30be1a2b03b8b650a28c5f2479c9c.zip |
BugUrl: style tweaks for consistency in Chromium.pm
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | Bugzilla/BugUrl/Chromium.pm | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Bugzilla/BugUrl/Chromium.pm b/Bugzilla/BugUrl/Chromium.pm index 5560df24c..dafe7f815 100644 --- a/Bugzilla/BugUrl/Chromium.pm +++ b/Bugzilla/BugUrl/Chromium.pm @@ -11,7 +11,7 @@ use 5.10.1; use strict; use warnings; -use base qw(Bugzilla::BugUrl); +use parent qw(Bugzilla::BugUrl); use Bugzilla::Error; use Bugzilla::Util; @@ -21,29 +21,29 @@ use Bugzilla::Util; ############################### sub should_handle { - my ($class, $uri) = @_; - return ($uri->authority =~ /^bugs.chromium.org$/i) ? 1 : 0; + my ($class, $uri) = @_; + return ($uri->authority =~ /^bugs.chromium.org$/i) ? 1 : 0; } sub _check_value { - my ($class, $uri) = @_; - - $uri = $class->SUPER::_check_value($uri); - - my $value = $uri->as_string; - my $project_name; - if ($uri->path =~ m|^/p/([^/]+)/issues/detail$|) { - $project_name = $1; - } else { - ThrowUserError('bug_url_invalid', { url => $value }); - } - my $bug_id = $uri->query_param('id'); - detaint_natural($bug_id); - if (!$bug_id) { - ThrowUserError('bug_url_invalid', { url => $value, reason => 'id' }); - } - - return URI->new($value); + my ($class, $uri) = @_; + + $uri = $class->SUPER::_check_value($uri); + + my $value = $uri->as_string; + my $project_name; + if ($uri->path =~ m|^/p/([^/]+)/issues/detail$|) { + $project_name = $1; + } else { + ThrowUserError('bug_url_invalid', { url => $value }); + } + my $bug_id = $uri->query_param('id'); + detaint_natural($bug_id); + if (!$bug_id) { + ThrowUserError('bug_url_invalid', { url => $value, reason => 'id' }); + } + + return URI->new($value); } 1; |