@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | use Guzzle\Http\Message\Response; |
7 | 7 | use seregazhuk\SmsIntel\Contracts\HttpInterface; |
8 | 8 | |
9 | -class GuzzleHttpAdapter implements HttpInterface{ |
|
9 | +class GuzzleHttpAdapter implements HttpInterface { |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @var Client |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | * @param array $params |
24 | 24 | * @return array |
25 | 25 | */ |
26 | - public function get($uri, $params = []) |
|
26 | + public function get($uri, $params = [ ]) |
|
27 | 27 | { |
28 | - if(!empty($params)){ |
|
29 | - $uri .= '?'. http_build_query($params); |
|
28 | + if (!empty($params)) { |
|
29 | + $uri .= '?' . http_build_query($params); |
|
30 | 30 | } |
31 | 31 | $response = $this |
32 | 32 | ->client |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | $response = $this |
47 | 47 | ->client |
48 | - ->post($uri, [], $body) |
|
48 | + ->post($uri, [ ], $body) |
|
49 | 49 | ->send(); |
50 | 50 | return $this->parseResponse($response); |
51 | 51 | } |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | * @param array $params |
28 | 28 | * @return array|null |
29 | 29 | */ |
30 | - public function send($to, $from, $message, $params = []) |
|
30 | + public function send($to, $from, $message, $params = [ ]) |
|
31 | 31 | { |
32 | - $to = is_array($to) ? $to : [$to]; |
|
32 | + $to = is_array($to) ? $to : [ $to ]; |
|
33 | 33 | |
34 | 34 | $requestParams = array_merge( |
35 | 35 | [ |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function cancel($smsId) |
50 | 50 | { |
51 | - return $this->request->exec('cancel', ['smsid' => $smsId]); |
|
51 | + return $this->request->exec('cancel', [ 'smsid' => $smsId ]); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getReportBySms($smsId) |
94 | 94 | { |
95 | - return $this->request->exec('report', ['smsid' => $smsId]); |
|
95 | + return $this->request->exec('report', [ 'smsid' => $smsId ]); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @param array $params |
39 | 39 | * @return array|null |
40 | 40 | */ |
41 | - public function exec($action, $params = []) |
|
41 | + public function exec($action, $params = [ ]) |
|
42 | 42 | { |
43 | 43 | $endPoint = $this->makeEndPoint($action); |
44 | 44 | $requestBody = $this->createRequestBody($params); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | protected static function checkCredentials($login, $password) |
32 | 32 | { |
33 | - if(empty($login) || empty($password)) { |
|
33 | + if (empty($login) || empty($password)) { |
|
34 | 34 | throw new AuthException('You must provide login and password to send messages!'); |
35 | 35 | } |
36 | 36 | } |
@@ -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 |