All in GraphQL #34

Merged
timw4mail merged 87 commits from develop into master 2020-12-01 10:07:49 -05:00
Showing only changes of commit ed9a3227ac - Show all commits

View File

@ -132,11 +132,24 @@ final class PersonTransformer extends AbstractTransformer {
{ {
$characters[$role][$charId]['media'][$media['id']] = $media; $characters[$role][$charId]['media'][$media['id']] = $media;
} }
}
foreach ($characters as $role => $_)
{
// Sort the characters by name
uasort( uasort(
$characters[$role][$charId]['media'], $characters[$role],
fn ($a, $b) => $a['titles'][0] <=> $b['titles'][0] fn($a, $b) => $a['character']['canonicalName'] <=> $b['character']['canonicalName']
); );
// Sort the media for the character
foreach ($characters[$role] as $charId => $__)
{
uasort(
$characters[$role][$charId]['media'],
fn ($a, $b) => $a['titles'][0] <=> $b['titles'][0]
);
}
} }
krsort($characters); krsort($characters);