This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+3 -3
View File
@@ -43,11 +43,11 @@ trait Server
/**
* @return mixed|void
* @return mixed
* @throws NotFindClassException
* @throws ReflectionException
*/
public function onHandlerListener()
public function onHandlerListener(): mixed
{
$this->on('WorkerStop', $this->createHandler('workerStop'));
$this->on('WorkerExit', $this->createHandler('workerExit'));
@@ -83,7 +83,7 @@ trait Server
* @throws ReflectionException
* @throws Exception
*/
protected function createHandler($eventName)
protected function createHandler($eventName): array
{
$classPrefix = 'HttpServer\Events\On' . ucfirst($eventName);
if (!class_exists($classPrefix)) {