From 162d81d536f0154bdce5359c13fdf92953e3a4cb Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 02:31:06 +1200 Subject: [PATCH] Bug 6679 - [SIGNED-OFF] fix 4 perlcritic violations in C4/Branch.pm Subroutine prototypes used at line 157, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 375, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 385, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 418, column 1. See page 194 of PBP. (Severity: 5) Signed-off-by: Jonathan Druart Signed-off-by: Paul Poulain --- C4/Branch.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Branch.pm b/C4/Branch.pm index dcd4ef76a0..d765c99238 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -155,7 +155,7 @@ sub mybranch { return C4::Context->userenv->{branch} || ''; } -sub GetBranchesLoop (;$$) { # since this is what most pages want anyway +sub GetBranchesLoop { # since this is what most pages want anyway my $branch = @_ ? shift : mybranch(); # optional first argument is branchcode of "my branch", if preselection is wanted. my $onlymine = @_ ? shift : onlymine(); my $branches = GetBranches($onlymine); @@ -373,7 +373,7 @@ the categories were already here, and minimally used. =cut #TODO manage category types. rename possibly to 'agency domains' ? as borrowergroups are called categories. -sub GetCategoryTypes() { +sub GetCategoryTypes { return ( 'searchdomain','properties'); } @@ -383,7 +383,7 @@ $branch = GetBranch( $query, $branches ); =cut -sub GetBranch ($$) { +sub GetBranch { my ( $query, $branches ) = @_; # get branch for this query from branches my $branch = $query->param('branch'); my %cookie = $query->cookie('userenv'); @@ -416,7 +416,7 @@ Returns a href: keys %$branches eq (branchcode,branchname) . =cut -sub GetBranchesInCategory($) { +sub GetBranchesInCategory { my ($categorycode) = @_; my @branches; my $dbh = C4::Context->dbh();