Completed
Pull Request — master (#18)
by Sergey
06:49
created
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/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.
src/Api/Requests/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @var array
11 11
      */
12
-    static public $allowedMethod = [];
12
+    static public $allowedMethod = [ ];
13 13
 
14 14
     /**
15 15
      * @var HttpClient
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param array $params
53 53
      * @return array|null
54 54
      */
55
-    public function exec($action, $params = [])
55
+    public function exec($action, $params = [ ])
56 56
     {
57 57
         $endPoint = $this->makeEndPoint($action);
58 58
         $requestBody = $this->createRequestBody($params);
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
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @var Request[]
29 29
      */
30
-    protected $requests = [];
30
+    protected $requests = [ ];
31 31
 
32 32
     public function __construct(HttpClient $http, $login, $password)
33 33
     {
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
     public function getRequest($requestClass)
62 62
     {
63 63
         // Check if an instance has already been initiated
64
-        if (!isset($this->requests[$requestClass])) {
64
+        if (!isset($this->requests[ $requestClass ])) {
65 65
             $this->addRequest($requestClass);
66 66
         }
67
-        return $this->requests[$requestClass];
67
+        return $this->requests[ $requestClass ];
68 68
     }
69 69
 
70 70
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function resolveRequestByAction($action)
76 76
     {
77 77
         foreach ($this->getRequestsActionsMap() as $requestClass => $actions) {
78
-            if(in_array($action, $actions)) {
78
+            if (in_array($action, $actions)) {
79 79
                 return $this->getRequest($requestClass);
80 80
             }
81 81
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         if (!class_exists($requestClass)) {
97 97
             throw new WrongRequest("Request $requestClass not found.");
98 98
         }
99
-        $this->requests[$requestClass] = $this->buildRequest($requestClass);
99
+        $this->requests[ $requestClass ] = $this->buildRequest($requestClass);
100 100
     }
101 101
 
102 102
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     protected function buildRequest($className)
110 110
     {
111 111
         return (new ReflectionClass($className))
112
-            ->newInstanceArgs([$this->http])
112
+            ->newInstanceArgs([ $this->http ])
113 113
             ->setCredentials($this->login, $this->password);
114 114
     }
115 115
 }
116 116
\ No newline at end of file
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
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param array $params
26 26
      * @return string
27 27
      */
28
-    public function get($uri, $params = [])
28
+    public function get($uri, $params = [ ])
29 29
     {
30 30
         if (!empty($params)) {
31 31
             $uri .= '?' . http_build_query($params);
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
      * @param array $body
44 44
      * @return string
45 45
      */
46
-    public function post($uri, $body = [])
46
+    public function post($uri, $body = [ ])
47 47
     {
48 48
         return $this
49 49
             ->client
50
-            ->post($uri, [], $body)
50
+            ->post($uri, [ ], $body)
51 51
             ->send()
52 52
             ->getBody(true);
53 53
     }
Please login to merge, or discard this patch.