This commit is contained in:
xl
2023-11-22 10:30:03 +08:00
parent e0e5455576
commit 576e1c3ad8
2 changed files with 11 additions and 6 deletions
+1 -5
View File
@@ -37,14 +37,13 @@ class Handler implements RequestHandlerInterface
/**
* @param array|Closure $handler
* @param string $method
* @param array $parameter
* @param ReflectionNamedType|null $reflectionType
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ReflectionException
*/
public function __construct(public array|Closure $handler, string $method, public array $parameter, public ?ReflectionNamedType $reflectionType)
public function __construct(public array|Closure $handler, public array $parameter, public ?ReflectionNamedType $reflectionType)
{
$this->container = \Kiri::getDi();
if ($this->reflectionType != null) {
@@ -52,9 +51,6 @@ class Handler implements RequestHandlerInterface
} else {
$this->format = $this->container->get(MixedFormat::class);
}
if ($method === 'HEAD') {
$this->format = $this->container->get(NoBody::class);
}
}