@param RuleInterface|null $next

@return RuleInterface
6800
public static function roleId(RuleInterface $next = null): RuleInterface
    {
        return self::asSanitizedString(self::readable(RolesApi::class, $next));
    }
859467
public static function readable(string $apiClass, RuleInterface $next = null): RuleInterface
    {
        $primary = new IsReadableViaApiRule($apiClass);

        return $next === null ? $primary : new AndOperator($primary, $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);
    }
433611
public static function asSanitizedString(RuleInterface $next = null): RuleInterface
    {
        return self::isString(
            self::filter(FILTER_SANITIZE_FULL_SPECIAL_CHARS, null, ErrorCodes::INVALID_VALUE, $next)
        );
    }
1040832
private function next(QueryBuilder $nextQuery)
    {
        $now = new \DateTime('now');

        $qb = clone $nextQuery;
        $qb->setParameter(':currentTime', $now->format('Y-m-d H:i:s'));

        return $qb->execute()->fetch();
    }
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);
    }
1127493
public function execute($command, callable $next)
    {
        if (!$command->validate()) {
            throw new ValidationException(implode(', ', $command->getFirstErrors()));
        }

        return $next($command);
    }
785741
public function process(
        RequestInterface $request,
        ResponseInterface $response,
        DelegateInterface $next = null
    ) {
        try {
            if ($next) {
                return $next->next($request, $response);
            }
            return $response;
        } catch (\Exception $e) {
            return WhoopsRunner::handle($e, $request);
        }
    }
450757
public function findSiblingContainer(EM\ContainerInterface $container, $next = false)
    {
        if (null === $content = $container->getContent()) {
            return null;
        }

        return $this->findSibling($content->getContainers(), $container, $next);
    }
855416
public function handle($request, \Closure $next)
    {
        $this->filter->add(
            'body_class',
            $this->dispatchBodyClass($request->route())
        );

        return $next($request);
    }
1181052
protected static function required(RuleInterface $rule = null): RuleInterface
    {
        return $rule === null ? new Required(static::success()) : new Required($rule);
    }
1057956
public static function usersRelationship(RuleInterface $next = null): RuleInterface
    {
        $readableAll = static::stringArrayToIntArray(static::readableAll(UsersApi::class, $next));

        return self::toManyRelationship(UserSchema::TYPE, $readableAll);
    }
1171439
protected static function isDateTime(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsDateTime() : new AndOperator(new AsDateTime(), $next);
    }
826884
public static function exists(string $tableName, string $primaryName, RuleInterface $next = null): RuleInterface
    {
        $primary = new ExistInDbTableSingleWithDoctrineRule($tableName, $primaryName);

        return $next === null ? $primary : new AndOperator($primary, $next);
    }
624592
public function handle($command, Closure $next)
    {
        return DB::transaction(function () use ($command, $next) {
            return $next($command);
        });
    }
213845
protected static function isBool(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsBool() : new AndOperator(new AsBool(), $next);
    }
913075
public static function validator(RuleInterface $rule, ContainerInterface $container = null): ValidatorInterface
    {
        $validator = new static($rule, $container);

        return $validator;
    }