Bugzilla – Attachment 114787 Details for
Bug 27327
Indirect object notation in Koha::Club::Hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold
Bug-27327-Get-rid-of-indirect-object-notation-in-K.patch (text/plain), 1.54 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-01-04 13:37:15 UTC
(
hide
)
Description:
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-01-04 13:37:15 UTC
Size:
1.54 KB
patch
obsolete
>From 8cb596011a82a7be5f8a980493bcad1d69c93469 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 Jan 2021 10:35:37 -0300 >Subject: [PATCH] Bug 27327: Get rid of indirect object notation in > Koha::Club::Hold > >This patch makes the code follow the PERL29 coding guideline. Period. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Club/Hold.pm | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/Koha/Club/Hold.pm b/Koha/Club/Hold.pm >index 39a58dc7d4..df8be67de2 100644 >--- a/Koha/Club/Hold.pm >+++ b/Koha/Club/Hold.pm >@@ -54,17 +54,21 @@ Class (static) method that returns a new Koha::Club::Hold instance > sub add { > my ( $params ) = @_; > >- throw Koha::Exceptions::ClubHold unless $params->{club_id} && $params->{biblio_id}; >+ Koha::Exceptions::ClubHold->throw() >+ unless $params->{club_id} && $params->{biblio_id}; >+ > my $club = Koha::Clubs->find($params->{club_id}); > my @enrollments = $club->club_enrollments->as_list; >- throw Koha::Exceptions::ClubHold::NoPatrons() unless scalar @enrollments; >+ >+ Koha::Exceptions::ClubHold::NoPatrons->throw() >+ unless scalar @enrollments; > > my $biblio = Koha::Biblios->find($params->{biblio_id}); > > my $club_params = { >- club_id => $params->{club_id}, >+ club_id => $params->{club_id}, > biblio_id => $params->{biblio_id}, >- item_id => $params->{item_id} >+ item_id => $params->{item_id} > }; > > my $club_hold = Koha::Club::Hold->new($club_params)->store(); >-- >2.30.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27327
:
114787
|
115826