diff --git a/app/gateway/service/AuthService.php b/app/gateway/service/AuthService.php index 5c4f051..c06f602 100644 --- a/app/gateway/service/AuthService.php +++ b/app/gateway/service/AuthService.php @@ -34,12 +34,12 @@ class AuthService { if ($sign_type == 2) { $type = 'md5'; - $request['token'] = isset($request['token']) ? $request['token'] : $token; + $request['token'] = $request['token'] ?? $token; } else { $type = 'sha1'; - $request['time'] = isset($request['time']) ? $request['time'] : self::timestamp(); - $request['nonce'] = isset($request['nonce']) ? $request['nonce'] : self::nonce(); - $request['token'] = isset($request['token']) ? $request['token'] : self::token($token); + $request['time'] = $request['time'] ?? self::timestamp(); + $request['nonce'] = $request['nonce'] ?? self::nonce(); + $request['token'] = $request['token'] ?? self::token($token); } if(isset($request['version'])){ $request['sign'] = self::signature($request, $type);