X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=lib%2FAPI%2FCall.php;h=787f98db3b24238654bf1a42e0d628247cdc1ed5;hp=56e15dcab4a759d9b5e86d4d9fd1972039df93d0;hb=5bb5547a9a7275ae61eff8e1a02cfa694e89feab;hpb=0bb8fbef656d708ffbc7a4c331f023b118e8e331 diff --git a/lib/API/Call.php b/lib/API/Call.php index 56e15dc..787f98d 100644 --- a/lib/API/Call.php +++ b/lib/API/Call.php @@ -3,9 +3,11 @@ namespace seekat\API; use Exception; -use http\Client; -use http\Client\Request; -use http\Client\Response; +use http\ { + Client, + Client\Request, + Client\Response +}; use React\Promise\Deferred; use seekat\API; use SplObserver; @@ -15,7 +17,7 @@ class Call extends Deferred implements SplObserver { /** * The endpoint - * @var \seekat\API + * @var API */ private $api; @@ -40,9 +42,9 @@ class Call extends Deferred implements SplObserver /** * Create a deferred promise for the response of $request * - * @var \seekat\API $api The endpoint of the request - * @var Client $client The HTTP client to send the request - * @var Request The request to execute + * @param API $api The endpoint of the request + * @param Client $client The HTTP client to send the request + * @param Request $request The request to execute */ function __construct(API $api, Client $client, Request $request) { $this->api = $api; @@ -52,7 +54,7 @@ class Call extends Deferred implements SplObserver parent::__construct(function($resolve, $reject) { return $this->cancel($resolve, $reject); }); - + $client->attach($this); $client->enqueue($request); /* start off */ @@ -64,9 +66,9 @@ class Call extends Deferred implements SplObserver * * Import the response's data on success and resolve the promise. * - * @var SplSubject $client The observed HTTP client - * @var Request The request which generated the update - * @var object $progress The progress information + * @param SplSubject $client The observed HTTP client + * @param Request $request The request which generated the update + * @param object $progress The progress information */ function update(SplSubject $client, Request $request = null, $progress = null) { if ($request !== $this->request) {