From adac6fc47334760c16c67b67209cf30c0795ebe5 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 --- 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 4aeb1884d89..7b0eeb3657d 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -1221,14 +1221,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 a82ad168b15..fe69c304e7f 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 + } -- 2.39.5 (Apple Git-154)