source/Internal/Review/Service/UserReviewAndRatingService.php
private function sortReviewAndRatingList(ArrayCollection $reviewAndRatingList)
    {
        $reviewAndRatingListArray = $reviewAndRatingList->toArray();

        usort($reviewAndRatingListArray, function (ReviewAndRating $first, ReviewAndRating $second) {
            return $first->getCreatedAt() < $second->getCreatedAt() ? 1 : -1;
        });

        return new ArrayCollection($reviewAndRatingListArray);
    }
private function sortReviewAndRatingList(ArrayCollection $reviewAndRatingList)
    {
        $reviewAndRatingListArray = $reviewAndRatingList->toArray();

        usort($reviewAndRatingListArray, function (ReviewAndRating $first, ReviewAndRating $second) {
            return $first->getCreatedAt() < $second->getCreatedAt() ? 1 : -1;
        });

        return new ArrayCollection($reviewAndRatingListArray);
    }
private function sortReviewAndRatingList ( ArrayCollection $ reviewAndRatingList ) { $ reviewAndRatingListArray = $ reviewAndRatingList -> toArray ( ) ; usort ( $ reviewAndRatingListArray , function ( ReviewAndRating $ first , ReviewAndRating $ second ) { return $ first -> getCreatedAt ( ) < $ second -> getCreatedAt ( ) ? 1 : - 1 ; } ) ; return new ArrayCollection ( $ reviewAndRatingListArray ) ; }
Sorts ReviewAndRating list.

@param ArrayCollection $reviewAndRatingList

@return ArrayCollection
Sorts ReviewAndRating list .