diff --git a/HttpServer/Events/OnHandshake.php b/HttpServer/Events/OnHandshake.php index d6c2b7c6..c25c3b74 100644 --- a/HttpServer/Events/OnHandshake.php +++ b/HttpServer/Events/OnHandshake.php @@ -53,7 +53,8 @@ class OnHandshake extends Callback } /** @var AWebsocket $manager */ - $manager = Snowflake::app()->annotation->get('websocket'); + $manager = Snowflake::app()->getAnnotation()->get('websocket'); + var_dump($manager); if ($manager->has($manager->getName(AWebsocket::HANDSHAKE))) { $manager->runWith($manager->getName(AWebsocket::HANDSHAKE), [$request, $response]); } else { diff --git a/System/Annotation/Annotation.php b/System/Annotation/Annotation.php index 1a613e20..20b6f57d 100644 --- a/System/Annotation/Annotation.php +++ b/System/Annotation/Annotation.php @@ -152,7 +152,7 @@ class Annotation extends BaseAnnotation * @param $className * @throws ReflectionException */ - protected function scanning($path, $namespace, $className) + protected function scanning(string $path, $namespace, $className) { $di = Snowflake::getDi(); foreach (glob($path . '/*') as $file) {