From 3c3cdfef3293146adcdda48762f921eb037e842e Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 21 Dec 2020 14:01:40 +0800 Subject: [PATCH] Update WechatService.php --- app/wechat/service/WechatService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/wechat/service/WechatService.php b/app/wechat/service/WechatService.php index 1db5c42df..6c1bf93cb 100644 --- a/app/wechat/service/WechatService.php +++ b/app/wechat/service/WechatService.php @@ -97,7 +97,7 @@ class WechatService extends Service */ public static function __callStatic(string $name, array $arguments) { - [$type, $class, $classname] = self::paraseName($name); + [$type, $class, $classname] = self::parseName($name); if ("{$type}{$class}" !== $name) { throw new \think\Exception("抱歉,实例 {$name} 不在符合规则!"); } @@ -134,7 +134,7 @@ class WechatService extends Service * @param string $name * @return array */ - private static function paraseName(string $name): array + private static function parseName(string $name): array { foreach (['WeChat', 'WeMini', 'WeOpen', 'WePay', 'ThinkService'] as $type) { if (strpos($name, $type) === 0) {