X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=lib%2FAPI%2FLinks%2Ffunctions.php;h=f2b87d78123796f487dcc08746abbf453631aa3e;hp=f740851e9de6bc00131750539a63751142a89763;hb=d38b3ae03472ba2f9af5009778574b23472bb3f7;hpb=e368287b3cd2dd40945ac8d1a1946bc32268007d diff --git a/lib/API/Links/functions.php b/lib/API/Links/functions.php index f740851..f2b87d7 100644 --- a/lib/API/Links/functions.php +++ b/lib/API/Links/functions.php @@ -10,9 +10,9 @@ use seekat\API\Future; /** * Perform a GET request against the link's "first" relation * - * @return Promise + * @return mixed promise */ -function first(API $api, Cache\Service $cache = null) : Promise { +function first(API $api, Cache\Service $cache = null) { $links = $api->getLinks(); if ($links && ($first = $links->getFirst())) { return $api->withUrl($first)->get(null, null, $cache); @@ -23,9 +23,9 @@ function first(API $api, Cache\Service $cache = null) : Promise { /** * Perform a GET request against the link's "prev" relation * - * @return Promise + * @return mixed promise */ -function prev(API $api, Cache\Service $cache = null) : Promise { +function prev(API $api, Cache\Service $cache = null) { $links = $api->getLinks(); if ($links && ($prev = $links->getPrev())) { return $api->withUrl($prev)->get(null, null, $cache); @@ -36,9 +36,9 @@ function prev(API $api, Cache\Service $cache = null) : Promise { /** * Perform a GET request against the link's "next" relation * - * @return Promise + * @return mixed promise */ -function next(API $api, Cache\Service $cache = null) : Promise { +function next(API $api, Cache\Service $cache = null) { $links = $api->getLinks(); if ($links && ($next = $links->getNext())) { return $api->withUrl($next)->get(null, null, $cache); @@ -49,9 +49,9 @@ function next(API $api, Cache\Service $cache = null) : Promise { /** * Perform a GET request against the link's "last" relation * - * @return Promise + * @return mixed promise */ -function last(API $api, Cache\Service $cache = null) : Promise { +function last(API $api, Cache\Service $cache = null) { $links = $api->getLinks(); if ($links && ($last = $links->getLast())) { return $api->withUrl($last)->get(null, null, $cache);