@param RuleInterface|null $next

@return RuleInterface
340655
public static function asJsonApiDateTime(RuleInterface $next = null): RuleInterface
    {
        return self::stringToDateTime(DateTime::JSON_API_FORMAT, $next);
    }
6800
public static function roleId(RuleInterface $next = null): RuleInterface
    {
        return self::asSanitizedString(self::readable(RolesApi::class, $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);
    }
793226
public static function existAll(string $tableName, string $primaryName, RuleInterface $next = null): RuleInterface
    {
        $primary = new ExistInDbTableMultipleWithDoctrineRule($tableName, $primaryName);

        return $next === null ? $primary : new AndOperator($primary, $next);
    }
447187
protected static function stringLengthMax(int $max, RuleInterface $next = null): RuleInterface
    {
        return $next === null ?
            new StringLengthMax($max) :
            new AndOperator(static::stringLengthMax($max), $next);
    }
1054986
public function handle($request, Closure $next)
    {
        $this->credentials->getThrottleProvider()->enable();

        return $next($request);
    }
1093270
public function execute($command, callable $next)
    {
        $violations = $this->validator->validate($command);

        if ($violations->count() > 0) {
            throw new ValidationException(
                sprintf('Invalid command %s given', get_class($command)),
                0,
                null,
                $violations
            );
        }

        return $next($command);
    }
987842
public function handle(Request $request, Closure $next)
    {
        $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
        $this->setTrustedProxyIpAddresses($request);

        return $next($request);
    }
339030
protected static function equals($value, RuleInterface $next = null): RuleInterface
    {
        if ($value === null) {
            $rule = new IsNull();
        } elseif ($value instanceof DateTimeInterface) {
            $rule = new DateTimeEquals($value);
        } else {
            $rule = new ScalarEquals($value);
        }

        return $next === null ? $rule : new AndOperator(static::equals($value), $next);
    }
418617
public function handle( $request, Closure $next, $guard = null )
	{
		return AccountManager::i()->guard( $guard )->basic() ?: $next( $request );
	}
516235
protected static function stringLengthBetween(int $min, int $max, RuleInterface $next = null): RuleInterface
    {
        return $next === null ?
            new StringLengthBetween($min, $max) :
            new AndOperator(static::stringLengthBetween($min, $max), $next);
    }
1311928
public function handle($request, Closure $next)
    {
        // TODO: Get theme from user settings or system setting, or env or default....
        \Plugin::init();
        \Plugin::do_action('init');

        return $next($request);
    }
355920
public function getPattern($next)
    {
        $this->maps = [];
        $pat_items = [];
        if ($next != null) {
            foreach ($next as $tagname => $option) {
                $pattern = $this->analysis($tagname, $option);
                if ($pattern !== null) {
                    $pat_items[] = $pattern;
                }
            }
        }
        if (!isset($this->maps[0]) || !isset($pat_items[0])) {
            return null;
        }
        $pattern = '@' . join('|', $pat_items) . '@';
        return $pattern;
    }
433286
public static function roleRelationship(RuleInterface $next = null): RuleInterface
    {
        return self::toOneRelationship(RoleSchema::TYPE, static::roleId($next));
    }
1239499
public function delete($id, $next)
    {
        $status = $this->handler->destroy($id);
        return $next($id) && $status;
    }
491073
public function handle($request, Closure $next)
    {
        $request->setTrustedProxies(['127.0.0.1', $request->server->get('REMOTE_ADDR')]);

        return $next($request);
    }
101737
public function handle($request, Closure $next)
    {
        try {
            if ($this->validator->validateRequest($request)) {
                $this->app->singleton(LaravelExceptionHandler::class, function ($app) {
                    return $app[ExceptionHandler::class];
                });

                $request = $this->app->make(RequestContract::class)->createFromIlluminate($request);

                $this->events->dispatch(new RequestWasMatched($request, $this->app));

                return $this->sendRequestThroughRouter($request);
            }
        } catch (Exception $exception) {
            $this->exception->report($exception);

            return $this->exception->handle($exception);
        }

        return $next($request);
    }