@@ -9,7 +9,7 @@  | 
                                                    ||
| 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  | 
                                                        
@@ -34,7 +34,7 @@  | 
                                                    ||
| 34 | 34 | */  | 
                                                        
| 35 | 35 | public static function getAllowedMethods()  | 
                                                        
| 36 | 36 |      { | 
                                                        
| 37 | - return [];  | 
                                                        |
| 37 | + return [ ];  | 
                                                        |
| 38 | 38 | }  | 
                                                        
| 39 | 39 | |
| 40 | 40 | /**  | 
                                                        
@@ -41,7 +41,7 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                    ||
| 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  | 
                                                        
@@ -24,7 +24,7 @@ discard block  | 
                                                    ||
| 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  | 
                                                    ||
| 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 | /**  | 
                                                        
@@ -44,19 +44,19 @@  | 
                                                    ||
| 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 | }  | 
                                                        
@@ -44,7 +44,9 @@  | 
                                                    ||
| 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:  | 
                                                        
@@ -51,7 +51,7 @@ discard block  | 
                                                    ||
| 51 | 51 | */  | 
                                                        
| 52 | 52 | public function requestSource($name)  | 
                                                        
| 53 | 53 |      { | 
                                                        
| 54 | -        return $this->exec('requestSource', ['source' => $name]); | 
                                                        |
| 54 | +        return $this->exec('requestSource', [ 'source' => $name ]); | 
                                                        |
| 55 | 55 | }  | 
                                                        
| 56 | 56 | |
| 57 | 57 | /**  | 
                                                        
@@ -63,7 +63,7 @@ discard block  | 
                                                    ||
| 63 | 63 |      { | 
                                                        
| 64 | 64 | return $this->exec(  | 
                                                        
| 65 | 65 | 'getContacts',  | 
                                                        
| 66 | - ['idGroup' => $groupId, 'phone' => $phone]  | 
                                                        |
| 66 | + [ 'idGroup' => $groupId, 'phone' => $phone ]  | 
                                                        |
| 67 | 67 | );  | 
                                                        
| 68 | 68 | }  | 
                                                        
| 69 | 69 | |
@@ -73,7 +73,7 @@ discard block  | 
                                                    ||
| 73 | 73 | */  | 
                                                        
| 74 | 74 | public function getPhoneInfo($phone)  | 
                                                        
| 75 | 75 |      { | 
                                                        
| 76 | -        return $this->exec('getPhoneInfo', ['phone' => $phone]); | 
                                                        |
| 76 | +        return $this->exec('getPhoneInfo', [ 'phone' => $phone ]); | 
                                                        |
| 77 | 77 | }  | 
                                                        
| 78 | 78 | |
| 79 | 79 | /**  | 
                                                        
@@ -90,11 +90,11 @@ discard block  | 
                                                    ||
| 90 | 90 | * @param string|null $groupName  | 
                                                        
| 91 | 91 | * @return array|null  | 
                                                        
| 92 | 92 | */  | 
                                                        
| 93 | - public function getGroups($groupId = null, $groupName = null)  | 
                                                        |
| 93 | + public function getGroups($groupId = null, $groupName = null)  | 
                                                        |
| 94 | 94 |      { | 
                                                        
| 95 | 95 | return $this->exec(  | 
                                                        
| 96 | 96 | 'getGroups',  | 
                                                        
| 97 | - ['id' => $groupId, 'name' => $groupName]  | 
                                                        |
| 97 | + [ 'id' => $groupId, 'name' => $groupName ]  | 
                                                        |
| 98 | 98 | );  | 
                                                        
| 99 | 99 | }  | 
                                                        
| 100 | 100 | |
@@ -114,7 +114,7 @@ discard block  | 
                                                    ||
| 114 | 114 | */  | 
                                                        
| 115 | 115 | public function editGroup($name, $id)  | 
                                                        
| 116 | 116 |      { | 
                                                        
| 117 | -        return $this->exec('saveGroup', ['id' => $id, 'name' => $name]); | 
                                                        |
| 117 | +        return $this->exec('saveGroup', [ 'id' => $id, 'name' => $name ]); | 
                                                        |
| 118 | 118 | }  | 
                                                        
| 119 | 119 | |
| 120 | 120 | /**  | 
                                                        
@@ -132,7 +132,7 @@ discard block  | 
                                                    ||
| 132 | 132 | */  | 
                                                        
| 133 | 133 | public function removeContact($phone, $groupId = null)  | 
                                                        
| 134 | 134 |      { | 
                                                        
| 135 | -        return $this->exec('removeContact', ['phone' => $phone, 'groupId' => $groupId]); | 
                                                        |
| 135 | +        return $this->exec('removeContact', [ 'phone' => $phone, 'groupId' => $groupId ]); | 
                                                        |
| 136 | 136 | }  | 
                                                        
| 137 | 137 | |
| 138 | 138 | /**  |