From 01d0ea0ef3a7be47513da5f95cf0d0170c9e90ac Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 25 Oct 2024 09:06:11 -0400 Subject: [PATCH] Bug 38271: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer (cherry picked from commit 0f68688b5810836dede3625c65f6a71e5520989b) Signed-off-by: Lucas Gass (cherry picked from commit 5d0a0197569b6f8415de95ae88a6bc066564c5d4) Signed-off-by: Fridolin Somers --- Koha/EDI.pm | 6 +++--- t/db_dependent/Koha/EDI.t | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Koha/EDI.pm b/Koha/EDI.pm index c1005dbeec..199588cf46 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -1222,14 +1222,14 @@ sub _create_item_from_quote { } sub _handle_008_field { - my ( $bib_record ) = @_; + my ($bib_record) = @_; if ( !$bib_record->field('008') ) { my $default008 = biblio_008(); - $bib_record->insert_fields_ordered( MARC::Field->new('008', $default008)); + $bib_record->insert_fields_ordered( MARC::Field->new( '008', $default008 ) ); } - return $bib_record + return $bib_record; } 1; diff --git a/t/db_dependent/Koha/EDI.t b/t/db_dependent/Koha/EDI.t index a82ad168b1..fe69c304e7 100755 --- a/t/db_dependent/Koha/EDI.t +++ b/t/db_dependent/Koha/EDI.t @@ -130,7 +130,7 @@ subtest '_handle_008_field' => sub { $schema->storage->txn_begin; - # Add our test quote file to the database for testing against + # Add our test quote file to the database for testing against my $account = $builder->build( { source => 'VendorEdiAccount', @@ -190,16 +190,16 @@ subtest '_handle_008_field' => sub { # Tests for generated basket for passed quote file my $baskets = Koha::Acquisition::Baskets->search( { booksellerid => $account->{vendor_id} } ); - my $basket = $baskets->next; + my $basket = $baskets->next; my $orders = $basket->orders; - my $order = $orders->next; + my $order = $orders->next; - my $biblio = $order->biblio; - my $record = $biblio->record; + my $biblio = $order->biblio; + my $record = $biblio->record; my $record_field = $record->field('008'); - is(exists($record_field->{_data}), 1, 'Field has been added'); + is( exists( $record_field->{_data} ), 1, 'Field has been added' ); # Test without calling the 008 handler $account = $builder->build( @@ -288,4 +288,4 @@ subtest '_handle_008_field' => sub { is( $record_field->{_data}, undef, 'Field has not been added' ); $schema->storage->txn_rollback; -} \ No newline at end of file + }