Completed
Push — master ( d22dba...39712c )
by Sergey
02:07
created
src/Contracts/HttpInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      * @param array $params
10 10
      * @return array
11 11
      */
12
-    public function get($uri, $params = []);
12
+    public function get($uri, $params = [ ]);
13 13
 
14 14
     /**
15 15
      * @param $uri
Please login to merge, or discard this patch.
src/Requests/JSONRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function getSource($source)
23 23
     {
24
-        return $this->exec('requestSource', ['source' => $source]);
24
+        return $this->exec('requestSource', [ 'source' => $source ]);
25 25
     }
26 26
 
27 27
     /**
Please login to merge, or discard this patch.
src/Requests/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public static function getAllowedMethods()
36 36
     {
37
-        return [];
37
+        return [ ];
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.
src/Requests/RequestsContainer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * @var RequestInterface[]
43 43
      */
44
-    protected $requests = [];
44
+    protected $requests = [ ];
45 45
 
46 46
     /**
47 47
      * Gets request object by name. If there is no such request
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $requestClass = strtolower($requestClass);
60 60
         // Check if an instance has already been initiated
61
-        if (!isset($this->requests[$requestClass])) {
61
+        if (!isset($this->requests[ $requestClass ])) {
62 62
             $this->addRequest($requestClass);
63 63
         }
64
-        return $this->requests[$requestClass];
64
+        return $this->requests[ $requestClass ];
65 65
     }
66 66
 
67 67
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public function resolveRequestByAction($action)
73 73
     {
74 74
         foreach ($this->getRequestsActionsMap() as $requestClass => $actions) {
75
-            if(in_array($action, $actions)) {
75
+            if (in_array($action, $actions)) {
76 76
                 return $this->getRequest($requestClass);
77 77
             }
78 78
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         if (!class_exists($requestClass)) {
94 94
             throw new WrongRequestException("Request $requestClass not found.");
95 95
         }
96
-        $this->requests[$requestClass] = $this->buildRequest($requestClass);
96
+        $this->requests[ $requestClass ] = $this->buildRequest($requestClass);
97 97
     }
98 98
 
99 99
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     protected function buildRequest($className)
108 108
     {
109 109
         return (new ReflectionClass($className))
110
-            ->newInstanceArgs([$this->http])
110
+            ->newInstanceArgs([ $this->http ])
111 111
             ->setCredentials($this->login, $this->password);
112 112
     }
113 113
 }
114 114
\ No newline at end of file
Please login to merge, or discard this patch.
src/Adapters/GuzzleHttpAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param array $params
25 25
      * @return string
26 26
      */
27
-    public function get($uri, $params = [])
27
+    public function get($uri, $params = [ ])
28 28
     {
29 29
         if (!empty($params)) {
30 30
             $uri .= '?' . http_build_query($params);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function post($uri, $body)
41 41
     {
42
-        return $this->client->post($uri, [], $body)->send()->getBody(true);
42
+        return $this->client->post($uri, [ ], $body)->send()->getBody(true);
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
src/Sender.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,15 +46,15 @@
 block discarded – undo
46 46
     {
47 47
         switch (count($arguments)) {
48 48
             case 1:
49
-                return $request->{$method}($arguments[0]);
49
+                return $request->{$method}($arguments[ 0 ]);
50 50
             case 2:
51
-                return $request->{$method}($arguments[0], $arguments[1]);
51
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ]);
52 52
             case 3:
53
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2]);
53
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ]);
54 54
             case 4:
55
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2], $arguments[3]);
55
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ], $arguments[ 3 ]);
56 56
             case 5:
57
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);
57
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ], $arguments[ 3 ], $arguments[ 4 ]);
58 58
             default:
59 59
                 return $request->{$method}($arguments);
60 60
         }
Please login to merge, or discard this patch.