@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | const ENDPOINT_FORMAT = 'json'; |
36 | 36 | |
37 | - const ENDPOINT_REGION = '86'; // 中国区,目前只支持此国别 |
|
37 | + const ENDPOINT_REGION = '86'; // 中国区,目前只支持此国别 |
|
38 | 38 | |
39 | 39 | const SUCCESS_CODE = 200; |
40 | 40 |
@@ -154,7 +154,7 @@ |
||
154 | 154 | * 根据 指定的 keys 过滤应该参与签名的 header. |
155 | 155 | * |
156 | 156 | * @param array $headers |
157 | - * @param array $keys |
|
157 | + * @param string[] $keys |
|
158 | 158 | * |
159 | 159 | * @return array |
160 | 160 | */ |
@@ -112,7 +112,7 @@ |
||
112 | 112 | * @param string $appKey |
113 | 113 | * @param string $appSecret |
114 | 114 | * |
115 | - * @return array |
|
115 | + * @return string |
|
116 | 116 | */ |
117 | 117 | protected function getHeaders($appKey, $appSecret) |
118 | 118 | { |
@@ -267,7 +267,7 @@ |
||
267 | 267 | |
268 | 268 | $name = \ucfirst(\str_replace(['-', '_', ''], '', $name)); |
269 | 269 | |
270 | - return __NAMESPACE__."\\Gateways\\{$name}Gateway"; |
|
270 | + return __NAMESPACE__."\\Gateways\\{$name}gateway"; |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -82,7 +82,7 @@ |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
85 | - * @param $resource |
|
85 | + * @param string $resource |
|
86 | 86 | * @param $function |
87 | 87 | * |
88 | 88 | * @return string |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | - * @param $resource |
|
65 | - * @param $function |
|
64 | + * @param string $resource |
|
65 | + * @param string $function |
|
66 | 66 | * |
67 | 67 | * @return string |
68 | 68 | */ |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
97 | - * @param $endpoint |
|
97 | + * @param string $endpoint |
|
98 | 98 | * @param $params |
99 | 99 | * |
100 | 100 | * @return array |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'user-agent' => 'PHP EasySms Client', |
59 | 59 | ]; |
60 | 60 | |
61 | - $result = $this->request('get', self::getEndpointUri() . '?' . http_build_query($params), ['headers' => $headers,]); |
|
61 | + $result = $this->request('get', self::getEndpointUri().'?'.http_build_query($params), ['headers' => $headers, ]); |
|
62 | 62 | if (is_string($result)) { |
63 | 63 | $result = json_decode(json_encode(simplexml_load_string($result)), true); |
64 | 64 | } |
@@ -72,6 +72,6 @@ discard block |
||
72 | 72 | |
73 | 73 | public static function getEndpointUri() |
74 | 74 | { |
75 | - return 'http://' . static::ENDPOINT_HOST . static::ENDPOINT_URI; |
|
75 | + return 'http://'.static::ENDPOINT_HOST.static::ENDPOINT_URI; |
|
76 | 76 | } |
77 | 77 | } |