diff --git a/src/Foundation/ServiceProviders/PaymentServiceProvider.php b/src/Foundation/ServiceProviders/PaymentServiceProvider.php index faccec65e..59cf57205 100644 --- a/src/Foundation/ServiceProviders/PaymentServiceProvider.php +++ b/src/Foundation/ServiceProviders/PaymentServiceProvider.php @@ -25,9 +25,9 @@ */ namespace EasyWeChat\Foundation\ServiceProviders; +use EasyWeChat\Payment\LuckyMoney\LuckyMoney; use EasyWeChat\Payment\Merchant; use EasyWeChat\Payment\Payment; -use EasyWeChat\Payment\LuckyMoney\LuckyMoney; use Pimple\Container; use Pimple\ServiceProviderInterface; diff --git a/src/Payment/luckymoney/API.php b/src/Payment/luckymoney/API.php index adfdb33f0..8fbadc796 100644 --- a/src/Payment/luckymoney/API.php +++ b/src/Payment/luckymoney/API.php @@ -20,8 +20,8 @@ */ namespace EasyWeChat\Payment\LuckyMoney; -use EasyWeChat\Payment\Merchant; use EasyWeChat\Core\AbstractAPI; +use EasyWeChat\Payment\Merchant; use EasyWeChat\Support\Collection; use EasyWeChat\Support\XML; use Psr\Http\Message\ResponseInterface; @@ -108,7 +108,7 @@ public function query($orderNo) */ public function send(array $params, $type = self::TYPE_NORMAL) { - if ($type == self::TYPE_NORMAL) { + if ($type === self::TYPE_NORMAL) { $api = self::API_SEND; } else { $api = self::API_SEND_GROUP; @@ -208,5 +208,4 @@ protected function parseResponse($response) return new Collection((array) XML::parse($response)); } - } diff --git a/tests/Core/CoreHttpTest.php b/tests/Core/CoreHttpTest.php index 31fb78d68..09ebb60f6 100755 --- a/tests/Core/CoreHttpTest.php +++ b/tests/Core/CoreHttpTest.php @@ -118,7 +118,7 @@ public function testPost() $this->assertEquals(['form_params' => ['foo' => 'bar']], $response['body']); // string - $response = $http->post('http://easywechat.org', "hello here."); + $response = $http->post('http://easywechat.org', 'hello here.'); $this->assertEquals('http://easywechat.org', $response['url']); $this->assertEquals('POST', $response['method']);