Bug fixes
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
This commit is contained in:
parent
cacf19781d
commit
332ff72360
@ -225,13 +225,16 @@ final class Kitsu {
|
|||||||
// The 'canonical' title is always returned
|
// The 'canonical' title is always returned
|
||||||
$valid = [$data['canonicalTitle']];
|
$valid = [$data['canonicalTitle']];
|
||||||
|
|
||||||
if (array_key_exists('titles', $data))
|
foreach (['titles', 'abbreviatedTitles'] as $key)
|
||||||
{
|
{
|
||||||
foreach($data['titles'] as $alternateTitle)
|
if (array_key_exists($key, $data) && is_array($data[$key]))
|
||||||
{
|
{
|
||||||
if (self::titleIsUnique($alternateTitle, $valid))
|
foreach($data[$key] as $alternateTitle)
|
||||||
{
|
{
|
||||||
$valid[] = $alternateTitle;
|
if (self::titleIsUnique($alternateTitle, $valid))
|
||||||
|
{
|
||||||
|
$valid[] = $alternateTitle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,12 +98,12 @@ final class MangaTransformer extends AbstractTransformer {
|
|||||||
|
|
||||||
if ( ! empty($characters['main']))
|
if ( ! empty($characters['main']))
|
||||||
{
|
{
|
||||||
uasort($characters['main'], fn ($a, $b) => $a['name'] <=> $b['anime']);
|
uasort($characters['main'], fn ($a, $b) => $a['name'] <=> $b['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($characters['supporting']))
|
if ( ! empty($characters['supporting']))
|
||||||
{
|
{
|
||||||
uasort($characters['supporting'], fn ($a, $b) => $a['name'] <=> $b['anime']);
|
uasort($characters['supporting'], fn ($a, $b) => $a['name'] <=> $b['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort($characters);
|
ksort($characters);
|
||||||
|
@ -103,9 +103,7 @@ final class ParallelAPIRequest {
|
|||||||
|
|
||||||
foreach ($this->requests as $key => $url)
|
foreach ($this->requests as $key => $url)
|
||||||
{
|
{
|
||||||
$promises[$key] = call(static function () use ($client, $url) {
|
$promises[$key] = call(fn () => yield $client->request($url));
|
||||||
return yield $client->request($url);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return wait(all($promises));
|
return wait(all($promises));
|
||||||
|
Loading…
Reference in New Issue
Block a user