未验证 提交 908181b2 编写于 作者: 安正超 提交者: GitHub

Apply fixes from StyleCI (#49)

[ci skip] [skip ci]
上级 af14136e
......@@ -66,7 +66,7 @@ class AliyunGateway extends Gateway
$result = $this->get(self::ENDPOINT_URL, $params);
if ($result['Code'] != 'OK') {
if ('OK' != $result['Code']) {
throw new GatewayErrorException($result['Message'], $result['Code'], $result);
}
......
......@@ -66,7 +66,7 @@ class BaiduGateway extends Gateway
$result = $this->request('post', self::buildEndpoint($config), ['headers' => $headers, 'json' => $params]);
if ($result['code'] != self::SUCCESS_CODE) {
if (self::SUCCESS_CODE != $result['code']) {
throw new GatewayErrorException($result['message'], $result['code'], $result);
}
......
......@@ -51,7 +51,7 @@ class HuaxinGateway extends Gateway
'extno' => $config->get('ext_no'),
]);
if ($result['returnstatus'] !== 'Success') {
if ('Success' !== $result['returnstatus']) {
throw new GatewayErrorException($result['message'], 400, $result);
}
......
......@@ -52,7 +52,7 @@ class HuyiGateway extends Gateway
$result = $this->post(self::ENDPOINT_URL, $params);
if ($result['code'] != self::SUCCESS_CODE) {
if (self::SUCCESS_CODE != $result['code']) {
throw new GatewayErrorException($result['msg'], $result['code'], $result);
}
......
......@@ -49,7 +49,7 @@ class SubmailGateway extends Gateway
'vars' => json_encode($message->getData($this), JSON_FORCE_OBJECT),
]);
if ($result['status'] != 'success') {
if ('success' != $result['status']) {
throw new GatewayErrorException($result['msg'], $result['code'], $result);
}
......
......@@ -62,7 +62,7 @@ class YuntongxunGateway extends Gateway
],
]);
if ($result['statusCode'] != self::SUCCESS_CODE) {
if (self::SUCCESS_CODE != $result['statusCode']) {
throw new GatewayErrorException($result['statusCode'], $result['statusCode'], $result);
}
......
......@@ -96,7 +96,7 @@ class SendcloudGatewayTest extends TestCase
$gateway->shouldReceive('post')
->with(sprintf(SendcloudGateway::ENDPOINT_TEMPLATE, 'send'), \Mockery::on(function ($params) {
return isset($params['timestamp']) && strlen($params['timestamp']) == 13 && $params['timestamp'] <= time() * 1000;
return isset($params['timestamp']) && 13 == strlen($params['timestamp']) && $params['timestamp'] <= time() * 1000;
}))->andReturn([
'message' => '操作成功',
'result' => true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册