ws/style/uses/docs
[m6w6/seekat] / lib / API / Call.php
index 56e15dcab4a759d9b5e86d4d9fd1972039df93d0..787f98db3b24238654bf1a42e0d628247cdc1ed5 100644 (file)
@@ -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) {