fix attribute php74 compatibility

This commit is contained in:
sunxyw
2022-05-03 13:18:09 +08:00
parent a65fc4076b
commit 707a1ae628

View File

@@ -26,19 +26,7 @@ class CommandInfoUtil
/**
* 获取命令信息
*/
#[ArrayShape([[
'id' => 'string',
'call' => 'callable',
'descriptions' => ['string'],
'triggers' => ['trigger_name' => ['string']],
'args' => ['arg_name' => [
'name' => 'string',
'type' => 'string',
'description' => 'string',
'default' => 'mixed',
'required' => 'bool',
]],
]])]
#[ArrayShape([['id' => 'string', 'call' => 'callable', 'descriptions' => ['string'], 'triggers' => ['trigger_name' => ['string']], 'args' => ['arg_name' => ['name' => 'string', 'type' => 'string', 'description' => 'string', 'default' => 'mixed', 'required' => 'bool']]]])]
public function get(): array
{
if (!$this->exists()) {