Skip to content

Commit

Permalink
Merge pull request #129 from richard-parnaby-king/patch-1
Browse files Browse the repository at this point in the history
Replaced Laravel function `array_first` with vanilla php function `current`
  • Loading branch information
KhietNguyen83 authored Nov 7, 2022
2 parents 3123bf8 61b15b1 commit 76a367d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugin/SeoRender.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 516,7 @@ public function showProductStructuredData()
];
if ($review->getRatingVotes()->getData()) {
$ratingVotes = $review->getRatingVotes()->getData();
$vote = array_first($ratingVotes);
$vote = current($ratingVotes);
$reviewData['reviewRating'] = [
'@type' => 'Rating',
'ratingValue' => $vote['percent'],
Expand Down

0 comments on commit 76a367d

Please sign in to comment.