@param RuleInterface|null $next

@return RuleInterface
433611
public static function asSanitizedString(RuleInterface $next = null): RuleInterface
    {
        return self::isString(
            self::filter(FILTER_SANITIZE_FULL_SPECIAL_CHARS, null, ErrorCodes::INVALID_VALUE, $next)
        );
    }
24851
public function delete( $id, $next ) {
		$session_id = $this->sanitize( $id );

		$this->_delete( $session_id );

		return $next( $id );
	}
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);
    }
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);
    }
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);
    }
203603
public function setNext($next)
    {
        $this->_links[self::NEXT][self::HREF] = $next;
        $this->removeEmptyLinks();

        return $this;
    }
1254984
public function handle($request, Closure $next)
    {
        if ($this->auth->check() && $this->auth->viaRemember()) {
            $ip = $request->getClientIp();

            $this->updateFields($this->auth, $ip);
        }

        return $next($request);
    }
952652
public function execute($command, callable $next)
    {
        $filename = $command->getFile()->path();
        $this->apiDocBuilder->debug('Starting to parse file: ' . $filename);
        try {
            return $next($command);
        } catch (\Exception $e) {
            $this->apiDocBuilder->log('Unable to parse file "' . $filename . '", ' . $e->getMessage());
        }
        return null;
    }
926196
public function handle($request, $next)
    {
        $this->debug->setWebhook($request->all());

        return $next($request);
    }
827714
public function findSiblingBlock(EM\BlockInterface $block, $next = false)
    {
        if (null === $row = $block->getRow()) {
            return null;
        }

        return $this->findSibling($row->getBlocks(), $block, $next);
    }
776169
public function handle($request, Closure $next)
    {
        $route = $request->route();

        $this->router->substituteBindings($route);

        $this->substituteImplicitBindings($route);

        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);
    }
556047
public static function postRelationship(RuleInterface $next = null): RuleInterface
    {
        return self::toOneRelationship(PostSchema::TYPE, self::postId($next));
    }
1171439
protected static function isDateTime(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsDateTime() : new AndOperator(new AsDateTime(), $next);
    }
1054986
public function handle($request, Closure $next)
    {
        $this->credentials->getThrottleProvider()->enable();

        return $next($request);
    }
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);
    }
352974
public function execute($command, callable $next)
    {
        if ($command->switchTo) {
            $command = $command->switchTo;
        }

        return $next($command);
    }