Completed
Push — master ( 77c36b...b3e9fb )
by Charles
01:53
created
components/HttpClientComponent.php 2 patches
Unused Use Statements   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace yrc\components;
4 4
 
5
-use yii\base\BaseObject;
6
-use yii\httpclient\Client;
7
-use yii\httpclient\Request;
8
-use yii\httpclient\RequestEvent;
5
+use yii\base\BaseObject;
6
+use yii\httpclient\Client;
7
+use yii\httpclient\RequestEvent;
9 8
 use Yii;
10 9
 
11 10
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         parent::init();
52 52
         $this->client = new Client($this->clientOptions);
53 53
 
54
-        $this->client->on(Client::EVENT_BEFORE_SEND, function (RequestEvent $e) {
54
+        $this->client->on(Client::EVENT_BEFORE_SEND, function(RequestEvent $e) {
55 55
             Yii::info([
56 56
                 'message' => sprintf('Sending HTTP request [%s] %s', $e->request->getMethod(), $e->request->getUrl()),
57 57
                 'data' => [
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             ], 'httpclient');
64 64
         });
65 65
 
66
-        $this->client->on(Client::EVENT_AFTER_SEND, function (RequestEvent $e) {
66
+        $this->client->on(Client::EVENT_AFTER_SEND, function(RequestEvent $e) {
67 67
             Yii::info([
68 68
                 'message' => sprintf('Recieved HTTP response HTTP [%s] | [%s] %s', $e->response->getStatusCode(), $e->request->getMethod(), $e->request->getUrl()),
69 69
                 'data' => [
Please login to merge, or discard this patch.