eee
This commit is contained in:
@@ -28,8 +28,7 @@ class BindForm implements InjectParameterInterface
|
||||
* @param string $class
|
||||
* @param string $method
|
||||
* @return mixed
|
||||
* @throws ReflectionException
|
||||
* @throws Exception
|
||||
* @throws
|
||||
*/
|
||||
public function dispatch(string $class, string $method): object
|
||||
{
|
||||
@@ -38,10 +37,6 @@ class BindForm implements InjectParameterInterface
|
||||
$reflect = $container->getReflectionClass($this->formValidate);
|
||||
$object = $validator->setFormData($reflect->newInstanceWithoutConstructor());
|
||||
foreach ($reflect->getProperties() as $property) {
|
||||
// $binding = $property->getAttributes(Binding::class);
|
||||
// if (count($binding) < 1) {
|
||||
// continue;
|
||||
// }
|
||||
foreach ($property->getAttributes() as $attribute) {
|
||||
if (!class_exists($attribute->getName())) {
|
||||
continue;
|
||||
@@ -70,7 +65,7 @@ class BindForm implements InjectParameterInterface
|
||||
* @param object $object
|
||||
* @param string $property
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @throws
|
||||
*/
|
||||
private function insertDefaultValue(ReflectionNamedType|ReflectionUnionType $reflectionProperty, object $object, string $property): void
|
||||
{
|
||||
@@ -87,7 +82,7 @@ class BindForm implements InjectParameterInterface
|
||||
/**
|
||||
* @param ReflectionNamedType $type
|
||||
* @return array|false|int|string
|
||||
* @throws Exception
|
||||
* @throws
|
||||
*/
|
||||
private function defaultValue(ReflectionNamedType $type): array|false|int|string
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Kiri\Router\Validator;
|
||||
|
||||
use Kiri;
|
||||
use Kiri\Router\Constrict\ConstrictRequest;
|
||||
use Kiri\Router\Interface\ValidatorInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
@@ -91,8 +90,7 @@ class Validator
|
||||
/**
|
||||
* @param RequestInterface|ServerRequestInterface|ConstrictRequest $request
|
||||
* @return bool
|
||||
* @throws ReflectionException
|
||||
* @throws \Exception
|
||||
* @throws
|
||||
*/
|
||||
public function run(RequestInterface|ServerRequestInterface|ConstrictRequest $request): bool
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Kiri\Router\Validator;
|
||||
|
||||
use Exception;
|
||||
use Kiri\Di\Inject\Container;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
@@ -31,7 +30,7 @@ class ValidatorMiddleware implements MiddlewareInterface
|
||||
* @param ServerRequestInterface $request
|
||||
* @param RequestHandlerInterface $handler
|
||||
* @return ResponseInterface
|
||||
* @throws Exception
|
||||
* @throws
|
||||
*/
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user