改名
This commit is contained in:
@@ -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])) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user