Bug 8216: Allow SIP modules to pass critic tests
[koha.git] / C4 / SIP / ILS / Patron.pm
index f7400f4..d3a9762 100644 (file)
@@ -41,7 +41,7 @@ sub new {
        $debug and warn "new Patron (GetMember): " . Dumper($kp);
     unless (defined $kp) {
                syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
-               return undef;
+        return;
        }
        $kp = GetMemberDetails(undef,$patron_id);
        $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
@@ -207,7 +207,10 @@ sub check_password {
 # A few special cases, not in AUTOLOADed %fields
 sub fee_amount {
     my $self = shift;
-    return $self->{fines} || undef;
+    if ( $self->{fines} ) {
+        return $self->{fines};
+    }
+    return;
 }
 
 sub fines_amount {
@@ -231,7 +234,7 @@ sub expired {
 # 
 sub drop_hold {
     my ($self, $item_id) = @_;
-       $item_id or return undef;
+    return if !$item_id;
        my $result = 0;
        foreach (qw(hold_items unavail_holds)) {
                $self->{$_} or next;