@@ -22,14 +22,14 @@ |
||
22 | 22 | */ |
23 | 23 | public function register(Container $pimple) |
24 | 24 | { |
25 | - $pimple['js'] = function ($pimple) { |
|
25 | + $pimple['js'] = function($pimple) { |
|
26 | 26 | $js = new Js($pimple['access_token']); |
27 | 27 | $js->setCache($pimple['cache']); |
28 | 28 | |
29 | 29 | return $js; |
30 | 30 | }; |
31 | 31 | |
32 | - $contact = function ($pimple) { |
|
32 | + $contact = function($pimple) { |
|
33 | 33 | $js = new Contact($pimple['access_token']); |
34 | 34 | $js->setCache($pimple['cache']); |
35 | 35 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple['merchant'] = function ($pimple) { |
|
28 | + $pimple['merchant'] = function($pimple) { |
|
29 | 29 | $config = array_merge( |
30 | 30 | ['app_id' => $pimple['config']['app_id']], |
31 | 31 | $pimple['config']->get('payment', []) |
@@ -34,19 +34,19 @@ discard block |
||
34 | 34 | return new Merchant($config); |
35 | 35 | }; |
36 | 36 | |
37 | - $pimple['payment'] = function ($pimple) { |
|
37 | + $pimple['payment'] = function($pimple) { |
|
38 | 38 | return new Payment($pimple['merchant']); |
39 | 39 | }; |
40 | 40 | |
41 | - $pimple['lucky_money'] = function ($pimple) { |
|
41 | + $pimple['lucky_money'] = function($pimple) { |
|
42 | 42 | return new LuckyMoney($pimple['merchant']); |
43 | 43 | }; |
44 | 44 | |
45 | - $pimple['merchant_pay'] = function ($pimple) { |
|
45 | + $pimple['merchant_pay'] = function($pimple) { |
|
46 | 46 | return new MerchantPay($pimple['merchant']); |
47 | 47 | }; |
48 | 48 | |
49 | - $pimple['cash_coupon'] = function ($pimple) { |
|
49 | + $pimple['cash_coupon'] = function($pimple) { |
|
50 | 50 | return new CashCoupon($pimple['merchant']); |
51 | 51 | }; |
52 | 52 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function register(Container $pimple) |
23 | 23 | { |
24 | - $pimple['staff'] = function ($pimple) { |
|
24 | + $pimple['staff'] = function($pimple) { |
|
25 | 25 | return new Staff($pimple['access_token']); |
26 | 26 | }; |
27 | 27 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function register(Container $pimple) |
23 | 23 | { |
24 | - $pimple['menu'] = function ($pimple) { |
|
24 | + $pimple['menu'] = function($pimple) { |
|
25 | 25 | return new Menu($pimple['access_token']); |
26 | 26 | }; |
27 | 27 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function register(Container $pimple) |
18 | 18 | { |
19 | - $pimple['fundamental.api'] = function ($pimple) { |
|
19 | + $pimple['fundamental.api'] = function($pimple) { |
|
20 | 20 | return new API($pimple['access_token']); |
21 | 21 | }; |
22 | 22 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | parent::__construct(); |
86 | 86 | |
87 | - $this['config'] = function () use ($config) { |
|
87 | + $this['config'] = function() use ($config) { |
|
88 | 88 | return new Config($config); |
89 | 89 | }; |
90 | 90 | |
@@ -218,19 +218,19 @@ discard block |
||
218 | 218 | */ |
219 | 219 | private function registerBase() |
220 | 220 | { |
221 | - $this['request'] = function () { |
|
221 | + $this['request'] = function() { |
|
222 | 222 | return Request::createFromGlobals(); |
223 | 223 | }; |
224 | 224 | |
225 | 225 | if (!empty($this['config']['cache']) && $this['config']['cache'] instanceof CacheInterface) { |
226 | 226 | $this['cache'] = $this['config']['cache']; |
227 | 227 | } else { |
228 | - $this['cache'] = function () { |
|
228 | + $this['cache'] = function() { |
|
229 | 229 | return new FilesystemCache(sys_get_temp_dir()); |
230 | 230 | }; |
231 | 231 | } |
232 | 232 | |
233 | - $this['access_token'] = function () { |
|
233 | + $this['access_token'] = function() { |
|
234 | 234 | return new AccessToken( |
235 | 235 | $this['config']['corp_id'], |
236 | 236 | $this['config']['secret'], |
@@ -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. |
@@ -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 | const MSG_TYPE_TEXTCARD = 'textcard'; // 文本卡片 |
23 | 23 |
@@ -168,7 +168,7 @@ |
||
168 | 168 | $return = []; |
169 | 169 | array_walk_recursive( |
170 | 170 | $array, |
171 | - function ($x) use (&$return) { |
|
171 | + function($x) use (&$return) { |
|
172 | 172 | $return[] = $x; |
173 | 173 | } |
174 | 174 | ); |