I tried my self to change the sorting, but it doesn’t work.
I changed this
/**
* rank Teams
*
* @param array $teams
* @return array of teams
*/
function rankTeams( $teams )
{
foreach ( $teams AS $key => $row ) {
$points[$key] = $row->points['plus'];
$done[$key] = $row->done_matches;
$diff[$key] = $row->diff;
}
array_multisort( $points, SORT_DESC, $diff, SORT_DESC, $done, SORT_ASC, $teams );
return $teams;
}
into this
/**
* rank Teams
*
* @param array $teams
* @return array of teams
*/
function rankTeams( $teams )
{
foreach ( $teams AS $key => $row ) {
$points[$key] = $row->points['plus'];
$goals[$key] = $row->goals['plus'];
$done[$key] = $row->done_matches;
$diff[$key] = $row->diff;
}
array_multisort( $points, SORT_DESC, $diff, SORT_DESC, $goals, SORT_DESC, $done, SORT_ASC, $teams );
return $teams;
}
but nothing changed in the sorting.