改名
This commit is contained in:
@@ -102,7 +102,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
* @return ?Node
|
* @return ?Node
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function addRoute($path, $handler, $method = 'any'): ?Node
|
public function addRoute($path, $handler, string $method = 'any'): ?Node
|
||||||
{
|
{
|
||||||
$method = strtolower($method);
|
$method = strtolower($method);
|
||||||
if (!isset(static::$nodes[$method])) {
|
if (!isset(static::$nodes[$method])) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Server extends HttpService
|
|||||||
* @param $process
|
* @param $process
|
||||||
* @param array $params
|
* @param array $params
|
||||||
*/
|
*/
|
||||||
public function addProcess($name, $process, $params = [])
|
public function addProcess($name, $process, array $params = [])
|
||||||
{
|
{
|
||||||
$this->process[$name] = $process;
|
$this->process[$name] = $process;
|
||||||
$this->params[$name] = $params;
|
$this->params[$name] = $params;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class Snowflake
|
|||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function createObject($className, $construct = []): mixed
|
public static function createObject($className, array $construct = []): mixed
|
||||||
{
|
{
|
||||||
if (is_object($className)) {
|
if (is_object($className)) {
|
||||||
return $className;
|
return $className;
|
||||||
|
|||||||
Reference in New Issue
Block a user