@param RuleInterface $next

@return RuleInterface
775688
protected static function isFloat(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsFloat() : new AndOperator(new AsFloat(), $next);
    }
1228491
public function handle(Request $request, Closure $next)
    {
        if ($this->cookieBanService->hasDifferentIp()) {
            $ip = $request->getClientIp();

            $this->kernel->call('ban-management:add-rule', compact('ip'));
        }

        return $next($request);
    }
373268
public static function userRelationship(RuleInterface $next = null): RuleInterface
    {
        return self::toOneRelationship(UserSchema::TYPE, static::userId($next));
    }
7366
public function handle($command, Closure $next)
    {
        if (property_exists($command, 'rules') && is_array($command->rules)) {
            $this->validate($command);
        }

        return $next($command);
    }
1040215
public function handle($request, Closure $next)
    {
        $this->kernel->setClosure($next);

        return $this->middleware->handle($request);
    }
463485
public function handle($request, \Closure $next)
    {
        $route = $request->route();

        if ($route->hasCondition()) {
            $this->router->addWordPressBindings($route);
        }

        return $next($request);
    }
246117
public function findSiblingRow(EM\RowInterface $row, $next = false)
    {
        if (null === $container = $row->getContainer()) {
            return null;
        }

        return $this->findSibling($container->getRows(), $row, $next);
    }
1239390
protected static function isInt(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsInt() : new AndOperator(new AsInt(), $next);
    }
624592
public function handle($command, Closure $next)
    {
        return DB::transaction(function () use ($command, $next) {
            return $next($command);
        });
    }
433611
public static function asSanitizedString(RuleInterface $next = null): RuleInterface
    {
        return self::isString(
            self::filter(FILTER_SANITIZE_FULL_SPECIAL_CHARS, null, ErrorCodes::INVALID_VALUE, $next)
        );
    }
217595
public function handle($request, Closure $next)
    {
        $this->app->setLocale($this->getCurrentLocale($request));

        return $next($request);
    }
871908
public function run(ServerRequestInterface $request, ResponseInterface $response, $next = null)
    {
        if (!$request->getAttribute('route') instanceof Route) {
            $route = $this->routes->getRoute($request);

            if (!$route) {
                return $this->notFound($request, $response);
            }

            $request = $request->withAttribute('route', $route);
        }
        
        $runner = $this->getRunner();

        return $runner($request, $response, $next);
    }
1132473
protected static function stringToBool(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new StringToBool() : new AndOperator(new StringToBool(), $next);
    }
36178
public function handle($request, Closure $next)
    {
        $this->core->menu()->initialize();

        return $next($request);
    }
450757
public function findSiblingContainer(EM\ContainerInterface $container, $next = false)
    {
        if (null === $content = $container->getContent()) {
            return null;
        }

        return $this->findSibling($content->getContainers(), $container, $next);
    }
1200087
public function handle($request, Closure $next)
    {
        if ($this->auth->check()) {
            /** @var CoreInterface $core */
            $core = app(Component::CORE);

            return redirect()->route( $core->prefixRoute(NamedRoute::HOME) );
        }

        return $next($request);
    }
338725
public static function asSanitizedUrl(RuleInterface $next = null): RuleInterface
    {
        return self::isString(self::filter(FILTER_SANITIZE_URL, null, ErrorCodes::INVALID_VALUE, $next));
    }