Completed
Push — master ( c04113...fe06bf )
by Sergey
07:13 queued 04:33
created
src/Api/Sender.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,19 +44,19 @@
 block discarded – undo
44 44
      */
45 45
     protected function callRequestMethod(RequestInterface $request, $method, array $arguments)
46 46
     {
47
-        if(empty($arguments)) return $request->{$method}();
47
+        if (empty($arguments)) return $request->{$method}();
48 48
 
49 49
         switch (count($arguments)) {
50 50
             case 1:
51
-                return $request->{$method}($arguments[0]);
51
+                return $request->{$method}($arguments[ 0 ]);
52 52
             case 2:
53
-                return $request->{$method}($arguments[0], $arguments[1]);
53
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ]);
54 54
             case 3:
55
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2]);
55
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ]);
56 56
             case 4:
57
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2], $arguments[3]);
57
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ], $arguments[ 3 ]);
58 58
             case 5:
59
-                return $request->{$method}($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);
59
+                return $request->{$method}($arguments[ 0 ], $arguments[ 1 ], $arguments[ 2 ], $arguments[ 3 ], $arguments[ 4 ]);
60 60
             default:
61 61
                 return $request->{$method}($arguments);
62 62
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
      */
45 45
     protected function callRequestMethod(RequestInterface $request, $method, array $arguments)
46 46
     {
47
-        if(empty($arguments)) return $request->{$method}();
47
+        if(empty($arguments)) {
48
+            return $request->{$method}();
49
+        }
48 50
 
49 51
         switch (count($arguments)) {
50 52
             case 1:
Please login to merge, or discard this patch.
src/Api/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/Api/Requests/JSONRequest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function requestSource($name)
50 50
     {
51
-        return $this->exec('requestSource', ['source' => $name]);
51
+        return $this->exec('requestSource', [ 'source' => $name ]);
52 52
     }
53 53
 
54 54
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         return $this->exec(
62 62
             'getContacts',
63
-            ['idGroup' => $groupId, 'phone' => $phone]
63
+            [ 'idGroup' => $groupId, 'phone' => $phone ]
64 64
         );
65 65
     }
66 66
     
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getPhoneInfo($phone)
72 72
     {
73
-        return $this->exec('getPhoneInfo', ['phone' => $phone]);
73
+        return $this->exec('getPhoneInfo', [ 'phone' => $phone ]);
74 74
     }
75 75
 
76 76
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         return $this->exec(
93 93
             'getGroups',
94
-            ['id' => $groupId, 'name' => $groupName]
94
+            [ 'id' => $groupId, 'name' => $groupName ]
95 95
         );
96 96
     }
97 97
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function editGroup($name, $groupId)
113 113
     {
114
-        return $this->exec('saveGroup', ['id' => $groupId, 'name' => $name]);
114
+        return $this->exec('saveGroup', [ 'id' => $groupId, 'name' => $name ]);
115 115
     }
116 116
 
117 117
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function removeContact($phone, $groupId = null)
131 131
     {
132
-        return $this->exec('removeContact', ['phone' => $phone, 'groupId' => $groupId]);
132
+        return $this->exec('removeContact', [ 'phone' => $phone, 'groupId' => $groupId ]);
133 133
     }
134 134
 
135 135
     /**
Please login to merge, or discard this patch.
src/Api/Requests/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 abstract class Request implements RequestInterface
9 9
 {
10
-    static public $allowedMethod = [];
10
+    static public $allowedMethod = [ ];
11 11
 
12 12
     /**
13 13
      * @var HttpInterface
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param array $params
51 51
      * @return array|null
52 52
      */
53
-    public function exec($action, $params = [])
53
+    public function exec($action, $params = [ ])
54 54
     {
55 55
         $endPoint = $this->makeEndPoint($action);
56 56
         $requestBody = $this->createRequestBody($params);
Please login to merge, or discard this patch.
src/Api/GuzzleHttpClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @param array $params
23 23
      * @return string
24 24
      */
25
-    public function get($uri, $params = [])
25
+    public function get($uri, $params = [ ])
26 26
     {
27 27
         if (!empty($params)) {
28 28
             $uri .= '?' . http_build_query($params);
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
      * @param array $body
36 36
      * @return string
37 37
      */
38
-    public function post($uri, $body = [])
38
+    public function post($uri, $body = [ ])
39 39
     {
40 40
         return $this->client
41
-            ->post($uri, [], $body)
41
+            ->post($uri, [ ], $body)
42 42
             ->send()
43 43
             ->getBody(true);
44 44
     }
Please login to merge, or discard this patch.
src/Contracts/HttpClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 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 string $uri
16 16
      * @param array $body
17 17
      * @return array
18 18
      */
19
-    public function post($uri, $body = []);
19
+    public function post($uri, $body = [ ]);
20 20
 
21 21
     /**
22 22
      * @param string $url
Please login to merge, or discard this patch.
src/SmsIntel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@
 block discarded – undo
54 54
     /**
55 55
      * @codeCoverageIgnore
56 56
      */
57
-    private function __construct(){}
57
+    private function __construct() {}
58 58
 
59 59
     /**
60 60
      * @codeCoverageIgnore
61 61
      */
62
-    private function __clone(){}
62
+    private function __clone() {}
63 63
 }
Please login to merge, or discard this patch.