strict to phpstan-level-4

This commit is contained in:
crazywhalecc
2022-04-03 01:47:38 +08:00
parent 0bab2e74b0
commit 3451434997
19 changed files with 67 additions and 59 deletions

View File

@@ -15,6 +15,7 @@ use ZM\Annotation\Swoole\OnRequestEvent;
use ZM\API\CQ;
use ZM\API\OneBotV11;
use ZM\API\TuringAPI;
use ZM\Config\ZMConfig;
use ZM\ConnectionManager\ConnectionObject;
use ZM\Console\Console;
use ZM\Event\EventDispatcher;
@@ -95,11 +96,11 @@ class Hello
public function turingAPI()
{
$user_id = ctx()->getUserId();
$api = ''; // 请在这里填入你的图灵机器人的apikey
$api = ZMConfig::get('global', 'custom.turing_apikey') ?? ''; // 请在这里填入你的图灵机器人的apikey
if ($api === '') {
return false;
} // 如果没有填入apikey则此功能关闭
if (($this->_running_annotation ?? null) instanceof CQCommand) {
if (property_exists($this, '_running_annotation') && ($this->_running_annotation instanceof CQCommand)) {
$msg = ctx()->getFullArg('我在!有什么事吗?');
} else {
$msg = ctx()->getMessage();