@@ -367,7 +367,7 @@ |
||
| 367 | 367 | /** |
| 368 | 368 | * Put state to session storage and return it. |
| 369 | 369 | * |
| 370 | - * @return string|bool |
|
| 370 | + * @return false|string |
|
| 371 | 371 | */ |
| 372 | 372 | protected function makeState() |
| 373 | 373 | { |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | * |
| 124 | 124 | * @throws RuntimeException |
| 125 | 125 | * |
| 126 | - * @return bool |
|
| 126 | + * @return \EntWeChat\Support\Collection |
|
| 127 | 127 | */ |
| 128 | 128 | public function send() |
| 129 | 129 | { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * @param int|null $order |
| 23 | 23 | * @param int|null $partyId |
| 24 | 24 | * |
| 25 | - * @return int |
|
| 25 | + * @return \EntWeChat\Support\Collection |
|
| 26 | 26 | */ |
| 27 | 27 | public function create($name, $parentId, $order = null, $partyId = null) |
| 28 | 28 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * List all Departments. |
| 41 | 41 | * |
| 42 | - * @return array |
|
| 42 | + * @return \EntWeChat\Support\Collection |
|
| 43 | 43 | */ |
| 44 | 44 | public function lists() |
| 45 | 45 | { |
@@ -50,9 +50,8 @@ discard block |
||
| 50 | 50 | * Update a Department. |
| 51 | 51 | * |
| 52 | 52 | * @param int $partyId |
| 53 | - * @param array $name |
|
| 54 | 53 | * |
| 55 | - * @return bool |
|
| 54 | + * @return \EntWeChat\Support\Collection |
|
| 56 | 55 | */ |
| 57 | 56 | public function update($partyId, array $partyInfo = []) |
| 58 | 57 | { |
@@ -64,9 +63,8 @@ discard block |
||
| 64 | 63 | /** |
| 65 | 64 | * Delete Department. |
| 66 | 65 | * |
| 67 | - * @param int $groupId |
|
| 68 | 66 | * |
| 69 | - * @return bool |
|
| 67 | + * @return \EntWeChat\Support\Collection |
|
| 70 | 68 | */ |
| 71 | 69 | public function delete($partyId) |
| 72 | 70 | { |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | * Create tag. |
| 22 | 22 | * |
| 23 | 23 | * @param string $name |
| 24 | - * @param null $tagI |
|
| 24 | + * @param null $tagId |
|
| 25 | 25 | * |
| 26 | - * @return int |
|
| 26 | + * @return \EntWeChat\Support\Collection |
|
| 27 | 27 | */ |
| 28 | 28 | public function create($name, $tagId = null) |
| 29 | 29 | { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * List all tags. |
| 40 | 40 | * |
| 41 | - * @return array |
|
| 41 | + * @return \EntWeChat\Support\Collection |
|
| 42 | 42 | */ |
| 43 | 43 | public function lists() |
| 44 | 44 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param int $tagId |
| 52 | 52 | * @param string $name |
| 53 | 53 | * |
| 54 | - * @return bool |
|
| 54 | + * @return \EntWeChat\Support\Collection |
|
| 55 | 55 | */ |
| 56 | 56 | public function update($tagId, $name) |
| 57 | 57 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @param int $tagId |
| 70 | 70 | * |
| 71 | - * @return bool |
|
| 71 | + * @return \EntWeChat\Support\Collection |
|
| 72 | 72 | */ |
| 73 | 73 | public function delete($tagId) |
| 74 | 74 | { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @param string $tagId |
| 86 | 86 | * |
| 87 | - * @return int |
|
| 87 | + * @return \EntWeChat\Support\Collection |
|
| 88 | 88 | */ |
| 89 | 89 | public function usersOfTag($tagId) |
| 90 | 90 | { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param array $userIds |
| 101 | 101 | * @param array $partyIds |
| 102 | 102 | * |
| 103 | - * @return bool |
|
| 103 | + * @return \EntWeChat\Support\Collection |
|
| 104 | 104 | */ |
| 105 | 105 | public function batchTagUsers($tagId, array $userIds = [], array $partyIds = []) |
| 106 | 106 | { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @param array $userIds |
| 121 | 121 | * @param array $partyIds |
| 122 | 122 | * |
| 123 | - * @return bool |
|
| 123 | + * @return \EntWeChat\Support\Collection |
|
| 124 | 124 | */ |
| 125 | 125 | public function batchUntagUsers($tagId, array $userIds = [], array $partyIds = []) |
| 126 | 126 | { |
@@ -13,13 +13,13 @@ |
||
| 13 | 13 | const API_MESSAGE_SEND = 'https://qyapi.weixin.qq.com/cgi-bin/kf/send'; |
| 14 | 14 | |
| 15 | 15 | //用户类型 |
| 16 | - const USER_TYPE_STAFF = 'kf'; // 客服 |
|
| 17 | - const USER_TYPE_USERID = 'userid'; // 客户UserId |
|
| 18 | - const USER_TYPE_OPENID = 'openid'; // 客户OpenId |
|
| 16 | + const USER_TYPE_STAFF = 'kf'; // 客服 |
|
| 17 | + const USER_TYPE_USERID = 'userid'; // 客户UserId |
|
| 18 | + const USER_TYPE_OPENID = 'openid'; // 客户OpenId |
|
| 19 | 19 | |
| 20 | 20 | //客服类型 |
| 21 | - const STAFF_TYPE_INTERNAL = 'internal'; // 内部 |
|
| 22 | - const STAFF_TYPE_EXTERNAL = 'external'; // 外部 |
|
| 21 | + const STAFF_TYPE_INTERNAL = 'internal'; // 内部 |
|
| 22 | + const STAFF_TYPE_EXTERNAL = 'external'; // 外部 |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * List all staffs. |
@@ -188,7 +188,7 @@ |
||
| 188 | 188 | $return = []; |
| 189 | 189 | array_walk_recursive( |
| 190 | 190 | $array, |
| 191 | - function ($x) use (&$return) { |
|
| 191 | + function($x) use (&$return) { |
|
| 192 | 192 | $return[] = $x; |
| 193 | 193 | } |
| 194 | 194 | ); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $userIds = func_get_args(); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - $userIds = Arr::where((array) $userIds, function ($key, $value) { |
|
| 154 | + $userIds = Arr::where((array) $userIds, function($key, $value) { |
|
| 155 | 155 | return is_string($value) || is_numeric($value); |
| 156 | 156 | }); |
| 157 | 157 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $partyIds = func_get_args(); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $partyIds = Arr::where((array) $partyIds, function ($key, $value) { |
|
| 176 | + $partyIds = Arr::where((array) $partyIds, function($key, $value) { |
|
| 177 | 177 | return is_numeric($value); |
| 178 | 178 | }); |
| 179 | 179 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $tagIds = func_get_args(); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - $tagIds = Arr::where((array) $tagIds, function ($key, $value) { |
|
| 198 | + $tagIds = Arr::where((array) $tagIds, function($key, $value) { |
|
| 199 | 199 | return is_numeric($value); |
| 200 | 200 | }); |
| 201 | 201 | |
@@ -11,13 +11,13 @@ |
||
| 11 | 11 | { |
| 12 | 12 | const API_MESSAGE_SEND = 'https://qyapi.weixin.qq.com/cgi-bin/message/send'; |
| 13 | 13 | |
| 14 | - const MSG_TYPE_TEXT = 'text'; // 文本 |
|
| 15 | - const MSG_TYPE_NEWS = 'news'; // 图文 |
|
| 16 | - const MSG_TYPE_VOICE = 'voice'; // 语音 |
|
| 17 | - const MSG_TYPE_IMAGE = 'image'; // 图片 |
|
| 18 | - const MSG_TYPE_VIDEO = 'video'; // 视频 |
|
| 19 | - const MSG_TYPE_CARD = 'card'; // 卡券 |
|
| 20 | - const MSG_TYPE_FILE = 'file'; // 文件 |
|
| 14 | + const MSG_TYPE_TEXT = 'text'; // 文本 |
|
| 15 | + const MSG_TYPE_NEWS = 'news'; // 图文 |
|
| 16 | + const MSG_TYPE_VOICE = 'voice'; // 语音 |
|
| 17 | + const MSG_TYPE_IMAGE = 'image'; // 图片 |
|
| 18 | + const MSG_TYPE_VIDEO = 'video'; // 视频 |
|
| 19 | + const MSG_TYPE_CARD = 'card'; // 卡券 |
|
| 20 | + const MSG_TYPE_FILE = 'file'; // 文件 |
|
| 21 | 21 | const MSG_TYPE_MPNEWS = 'mpnews'; // 图文 |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function register(Container $pimple) |
| 23 | 23 | { |
| 24 | - $pimple['chat'] = function ($pimple) { |
|
| 24 | + $pimple['chat'] = function($pimple) { |
|
| 25 | 25 | return new Chat($pimple['access_token']); |
| 26 | 26 | }; |
| 27 | 27 | } |