diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 4cbeda57..80f2e56c 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -102,7 +102,7 @@ class Router extends HttpService implements RouterInterface * @return ?Node * @throws Exception */ - public function addRoute($path, $handler, $method = 'any'): ?Node + public function addRoute($path, $handler, string $method = 'any'): ?Node { $method = strtolower($method); if (!isset(static::$nodes[$method])) { diff --git a/HttpServer/Server.php b/HttpServer/Server.php index b8563cc5..1523d410 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -63,7 +63,7 @@ class Server extends HttpService * @param $process * @param array $params */ - public function addProcess($name, $process, $params = []) + public function addProcess($name, $process, array $params = []) { $this->process[$name] = $process; $this->params[$name] = $params; diff --git a/System/Snowflake.php b/System/Snowflake.php index ed47931a..d016a061 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -158,7 +158,7 @@ class Snowflake * @throws ReflectionException * @throws Exception */ - public static function createObject($className, $construct = []): mixed + public static function createObject($className, array $construct = []): mixed { if (is_object($className)) { return $className;