for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MuCTS\Sobot\Token\Token;
use \MuCTS\Sobot\Contracts\Request as RequestContract;
class Request extends RequestContract
{
private $createTime;
/**
* token创建时间
*
* @return int
* @author herry.yao <[email protected]>
* @version 1.2.2
* @date 2020-08-05
*/
public function getCreateTime()
if (is_null($this->createTime)) {
$this->createTime = time();
}
return $this->createTime;
* 获取签名
* @return string
protected function getSign()
return md5($this->getAppId() . $this->getCreateTime() . $this->getAppKey());
* 返回请求数据
* @return array
public function toArray(): array
return [
'appid' => $this->getAppId(),
'create_time' => $this->getCreateTime(),
'sign' => $this->getSign()
];