From 0d818057c76fc040ca6a563e0471108bae262950 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Mon, 1 Aug 2016 03:30:08 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- src/Card/Card.php | 71 ++++++++++++++++----------------- src/Core/AccessToken.php | 2 +- src/Notice/Notice.php | 10 ++--- src/Payment/API.php | 2 +- src/Payment/MerchantPay/API.php | 3 +- src/Staff/Session.php | 12 +++--- src/Support/XML.php | 2 +- 7 files changed, 50 insertions(+), 52 deletions(-) diff --git a/src/Card/Card.php b/src/Card/Card.php index 4a7d3b6be..35d3c4209 100644 --- a/src/Card/Card.php +++ b/src/Card/Card.php @@ -76,7 +76,7 @@ class Card extends AbstractAPI /** * 获取卡券颜色. * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getColors() { @@ -91,7 +91,7 @@ public function getColors() * @param array $especial * @param array $advancedInfo * - * @return bool|array + * @return \EasyWeChat\Support\Collection */ public function create($cardType = 'member_card', array $baseInfo = [], array $especial = [], array $advancedInfo = []) { @@ -110,7 +110,7 @@ public function create($cardType = 'member_card', array $baseInfo = [], array $e * * @param array $cards * - * @return array|bool + * @return \EasyWeChat\Support\Collection */ public function QRCode(array $cards = []) { @@ -250,7 +250,7 @@ public function getSignature() * SCENE_H5 h5页面,SCENE_IVR 自动回复,SCENE_CARD_CUSTOM_CELL 卡券自定义cell] * @param array $cardList * - * @return array + * @return \EasyWeChat\Support\Collection */ public function createLandingPage($banner, $pageTitle, $canShare, $scene, $cardList) { @@ -271,7 +271,7 @@ public function createLandingPage($banner, $pageTitle, $canShare, $scene, $cardL * @param string $cardId * @param array $code * - * @return array + * @return \EasyWeChat\Support\Collection */ public function deposit($cardId, $code) { @@ -288,7 +288,7 @@ public function deposit($cardId, $code) * * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getDepositedCount($cardId) { @@ -305,7 +305,7 @@ public function getDepositedCount($cardId) * @param string $cardId * @param array $code * - * @return array + * @return \EasyWeChat\Support\Collection */ public function checkCode($cardId, $code) { @@ -324,7 +324,7 @@ public function checkCode($cardId, $code) * @param bool $checkConsume * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getCode($code, $checkConsume, $cardId) { @@ -343,7 +343,7 @@ public function getCode($code, $checkConsume, $cardId) * @param string $cardId * @param string $code * - * @return array + * @return \EasyWeChat\Support\Collection */ public function consume($cardId, $code) { @@ -360,7 +360,7 @@ public function consume($cardId, $code) * * @param string $encryptedCode * - * @return array + * @return \EasyWeChat\Support\Collection */ public function decryptCode($encryptedCode) { @@ -376,7 +376,7 @@ public function decryptCode($encryptedCode) * * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getHtml($cardId) { @@ -390,10 +390,9 @@ public function getHtml($cardId) /** * 设置测试白名单. * - * @param array $openid - * @param array $username + * @param array $openids * - * @return array + * @return \EasyWeChat\Support\Collection */ public function setTestWhitelist($openids) { @@ -409,7 +408,7 @@ public function setTestWhitelist($openids) * * @param array $usernames * - * @return array + * @return \EasyWeChat\Support\Collection */ public function setTestWhitelistByUsername($usernames) { @@ -426,7 +425,7 @@ public function setTestWhitelistByUsername($usernames) * @param string $openid * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getUserCards($openid, $cardId = '') { @@ -443,7 +442,7 @@ public function getUserCards($openid, $cardId = '') * * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getCard($cardId) { @@ -461,7 +460,7 @@ public function getCard($cardId) * @param int $count * @param string $statusList * - * @return array + * @return \EasyWeChat\Support\Collection */ public function lists($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK') { @@ -482,7 +481,7 @@ public function lists($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIF * @param array $baseInfo * @param array $especial * - * @return array + * @return \EasyWeChat\Support\Collection */ public function update($cardId, $type, $baseInfo = [], $especial = []) { @@ -505,7 +504,7 @@ public function update($cardId, $type, $baseInfo = [], $especial = []) * @param string $cardId * @param bool $isOpen * - * @return array + * @return \EasyWeChat\Support\Collection */ public function setPayCell($cardId, $isOpen = true) { @@ -523,7 +522,7 @@ public function setPayCell($cardId, $isOpen = true) * @param string $cardId * @param int $amount * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function increaseStock($cardId, $amount) { @@ -536,7 +535,7 @@ public function increaseStock($cardId, $amount) * @param string $cardId * @param int $amount * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function reduceStock($cardId, $amount) { @@ -550,7 +549,7 @@ public function reduceStock($cardId, $amount) * @param int $amount * @param string $action * - * @return array + * @return \EasyWeChat\Support\Collection */ protected function updateStock($cardId, $amount, $action = 'increase') { @@ -570,7 +569,7 @@ protected function updateStock($cardId, $amount, $action = 'increase') * @param string $newCode * @param array $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function updateCode($code, $newCode, $cardId = []) { @@ -588,7 +587,7 @@ public function updateCode($code, $newCode, $cardId = []) * * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function delete($cardId) { @@ -605,7 +604,7 @@ public function delete($cardId) * @param string $code * @param string $cardId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function disable($code, $cardId = '') { @@ -622,7 +621,7 @@ public function disable($code, $cardId = '') * * @param array $info * - * @return array + * @return \EasyWeChat\Support\Collection */ public function activate($info = []) { @@ -636,7 +635,7 @@ public function activate($info = []) * @param array $requiredForm * @param array $optionalForm * - * @return array + * @return \EasyWeChat\Support\Collection */ public function activateUserForm($cardId, array $requiredForm = [], array $optionalForm = []) { @@ -651,7 +650,7 @@ public function activateUserForm($cardId, array $requiredForm = [], array $optio * @param string $cardId * @param string $code * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getMemberCardUser($cardId, $code) { @@ -668,7 +667,7 @@ public function getMemberCardUser($cardId, $code) * * @param array $params * - * @return array + * @return \EasyWeChat\Support\Collection */ public function updateMemberCardUser(array $params = []) { @@ -680,7 +679,7 @@ public function updateMemberCardUser(array $params = []) * * @param array $info * - * @return array + * @return \EasyWeChat\Support\Collection */ public function createSubMerchant(array $info = []) { @@ -707,7 +706,7 @@ public function createSubMerchant(array $info = []) * @param int $merchantId * @param array $info * - * @return array + * @return \EasyWeChat\Support\Collection */ public function updateSubMerchant($merchantId, array $info = []) { @@ -734,7 +733,7 @@ public function updateSubMerchant($merchantId, array $info = []) * * @param int $merchantId * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getSubMerchant($merchantId) { @@ -748,7 +747,7 @@ public function getSubMerchant($merchantId) * @param int $limit * @param string $status * - * @return array + * @return \EasyWeChat\Support\Collection */ public function listSubMerchants($beginId = 0, $limit = 50, $status = 'CHECKING') { @@ -764,7 +763,7 @@ public function listSubMerchants($beginId = 0, $limit = 50, $status = 'CHECKING' /** * 卡券开放类目查询接口. * - * @return array|bool + * @return \EasyWeChat\Support\Collection */ public function getCategories() { @@ -800,7 +799,7 @@ public function getCache() * * @param string $url * - * @return array + * @return Card */ public function setUrl($url) { diff --git a/src/Core/AccessToken.php b/src/Core/AccessToken.php index 615780573..965805786 100644 --- a/src/Core/AccessToken.php +++ b/src/Core/AccessToken.php @@ -202,7 +202,7 @@ public function getQueryFields() * * @throws \EasyWeChat\Core\Exceptions\HttpException * - * @return array|bool + * @return string */ public function getTokenFromServer() { diff --git a/src/Notice/Notice.php b/src/Notice/Notice.php index 3767273d2..00e50d0da 100644 --- a/src/Notice/Notice.php +++ b/src/Notice/Notice.php @@ -80,7 +80,7 @@ public function __construct(AccessToken $accessToken) * @param int $industryOne * @param int $industryTwo * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function setIndustry($industryOne, $industryTwo) { @@ -95,7 +95,7 @@ public function setIndustry($industryOne, $industryTwo) /** * Get industry. * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getIndustry() { @@ -107,7 +107,7 @@ public function getIndustry() * * @param string $shortId * - * @return string + * @return \EasyWeChat\Support\Collection */ public function addTemplate($shortId) { @@ -119,7 +119,7 @@ public function addTemplate($shortId) /** * Get private templates. * - * @return array + * @return \EasyWeChat\Support\Collection */ public function getPrivateTemplates() { @@ -145,7 +145,7 @@ public function deletePrivateTemplate($templateId) * * @param $data * - * @return mixed + * @return \EasyWeChat\Support\Collection * * @throws \EasyWeChat\Core\Exceptions\InvalidArgumentException */ diff --git a/src/Payment/API.php b/src/Payment/API.php index 15cc119da..1607891af 100644 --- a/src/Payment/API.php +++ b/src/Payment/API.php @@ -420,7 +420,7 @@ protected function safeRequest($api, array $params, $method = 'post') /** * Parse Response XML to array. * - * @param string|\Psr\Http\Message\ResponseInterface $response + * @param ResponseInterface $response * * @return \EasyWeChat\Support\Collection */ diff --git a/src/Payment/MerchantPay/API.php b/src/Payment/MerchantPay/API.php index 55bef1225..a4a159063 100644 --- a/src/Payment/MerchantPay/API.php +++ b/src/Payment/MerchantPay/API.php @@ -76,7 +76,6 @@ public function query($mchBillNo) * Send MerchantPay. * * @param array $params - * @param string $type * * @return \EasyWeChat\Support\Collection */ @@ -137,7 +136,7 @@ protected function request($api, array $params, $method = 'post') /** * Parse Response XML to array. * - * @param \Psr\Http\Message\ResponseInterface|string $response + * @param ResponseInterface $response * * @return \EasyWeChat\Support\Collection */ diff --git a/src/Staff/Session.php b/src/Staff/Session.php index ca6bd8bfe..eed1604f8 100644 --- a/src/Staff/Session.php +++ b/src/Staff/Session.php @@ -38,7 +38,7 @@ class Session extends AbstractAPI * * @param string $account * - * @return array + * @return \EasyWeChat\Support\Collection */ public function lists($account) { @@ -48,7 +48,7 @@ public function lists($account) /** * List all waiters of $account. * - * @return array + * @return \EasyWeChat\Support\Collection */ public function waiters() { @@ -59,9 +59,9 @@ public function waiters() * Create a session. * * @param string $account - * @param string $openid + * @param string $openId * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function create($account, $openId) { @@ -79,7 +79,7 @@ public function create($account, $openId) * @param string $account * @param string $openId * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function close($account, $openId) { @@ -96,7 +96,7 @@ public function close($account, $openId) * * @param string $openId * - * @return bool + * @return \EasyWeChat\Support\Collection */ public function get($openId) { diff --git a/src/Support/XML.php b/src/Support/XML.php index de60044b6..33eaedfb3 100644 --- a/src/Support/XML.php +++ b/src/Support/XML.php @@ -91,8 +91,8 @@ public static function cdata($string) /** * Object to array. * - * @param string $data * + * @param SimpleXMLElement $obj * @return array */ protected static function normalize($obj)