/** * Sort function for sorting arrays of Matches by Timestamp */ private static function sortMatchesByTimestamp(FoosMatch $a, FoosMatch $b) { if ($a->getTimestamp() == $b->getTimestamp()) { return 0; } return $a->getTimestamp() < $b->getTimestamp() ? 1 : -1; }