Skip to content

Commit

Permalink
fix: explicit return statements in Ingredients.pm (#7097)
Browse files Browse the repository at this point in the history
return: explicit return statements in Ingredients.pm

Adding explicit return statements to subroutines without them in
Ingredients.pm
  • Loading branch information
dipietroR authored and LandonPattison committed Jul 25, 2022
1 parent 36f4bb3 commit af6b719
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ProductOpener/Ingredients.pm
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ sub add_properties_from_specific_ingredients($) {
}
}
}
return;
}


Expand Down Expand Up @@ -1013,6 +1014,7 @@ sub add_specific_ingredients_from_labels($) {
}
}
}
return;
}


Expand Down Expand Up @@ -2182,6 +2184,7 @@ sub flatten_sub_ingredients($) {
# Delete the sub-ingredients, as they have been pushed at the end of the list
delete $product_ref->{ingredients}[$i]{ingredients};
}
return;
}


Expand Down Expand Up @@ -2284,6 +2287,7 @@ sub compute_ingredients_tags($) {
# ensure $product_ref->{ingredients_n} is last used as an int so that it is not saved as a strings
$product_ref->{ingredients_n} += 0;
}
return;
}


Expand Down Expand Up @@ -2871,6 +2875,7 @@ sub compute_ingredients_percent_estimates($$) {
}

$log->debug("compute_ingredients_percent_estimates - done", { ingredients_ref => $ingredients_ref }) if $log->is_debug();
return;
}


Expand Down Expand Up @@ -3107,6 +3112,7 @@ sub analyze_ingredients($) {

# Uncomment the following line to add an extra field with more data for debugging purposes
#$product_ref->{ingredients_analysis_debug} = $ingredients_analysis_ref;
return;
}


Expand Down Expand Up @@ -5940,6 +5946,7 @@ sub detect_allergens_from_ingredients($) {
$log->debug("detect_allergens_from_ingredients -- found allergen", { allergens => $allergens }) if $log->is_debug();
}
}
return;
}


Expand Down

0 comments on commit af6b719

Please sign in to comment.