Skip to content

Commit

Permalink
Changed type declaration + added check
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmeijer97 authored Dec 20, 2023
1 parent b40929c commit e18dd98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Actions/HarvestReviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ public function harvest(): void
info('Finished retrieving reviews.');
}

protected function saveReviews(array $reviews)
protected function saveReviews(?array $reviews)
{
foreach($reviews as $review) {
foreach($reviews ?? [] as $review) {
$score = round($review['total_score'] * 2);
$recommends = $review['recommends'] == config('feedback-company.recommended_value');

Expand Down

0 comments on commit e18dd98

Please sign in to comment.