This commit is contained in:
2021-07-13 18:03:08 +08:00
parent 3009c3fcf0
commit 68e331a960
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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])) {
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;