src/FlexPress/Components/PopularPosts/Helper.php
protected function sortByScore($a, $b)
    {

        if ($a->score == $b->score) {
            return 0;
        }

        return ($a->score > $b->score) ? -1 : 1;

    }
protected function sortByScore($a, $b)
    {

        if ($a->score == $b->score) {
            return 0;
        }

        return ($a->score > $b->score) ? -1 : 1;

    }
protected function sortByScore ( $ a , $ b ) { if ( $ a -> score == $ b -> score ) { return 0 ; } return ( $ a -> score > $ b -> score ) ? - 1 : 1 ; }
Sorting function, uses the score of a object to determine the order of the array

@param $a
@param $b

@return int
@author Tim Perry
Sorting function uses the score of a object to determine the order of the array