改名
This commit is contained in:
@@ -27,9 +27,6 @@ abstract class Server
|
||||
*/
|
||||
public function setEvents(string $name, ?array $events): void
|
||||
{
|
||||
if (!is_callable($events)) {
|
||||
return;
|
||||
}
|
||||
if (is_array($events) && is_string($events[0])) {
|
||||
$reflect = Snowflake::getDi()->getReflect($events[0]);
|
||||
if (!$reflect) {
|
||||
@@ -37,6 +34,9 @@ abstract class Server
|
||||
}
|
||||
$events[0] = $reflect->newInstance();
|
||||
}
|
||||
if (!is_callable($events)) {
|
||||
return;
|
||||
}
|
||||
$this->_events[$name] = $events;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user