@param RuleInterface|null $next

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

		$this->_delete( $session_id );

		return $next( $id );
	}
1057956
public static function usersRelationship(RuleInterface $next = null): RuleInterface
    {
        $readableAll = static::stringArrayToIntArray(static::readableAll(UsersApi::class, $next));

        return self::toManyRelationship(UserSchema::TYPE, $readableAll);
    }
452673
protected static function inValues(array $scalars, RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new ScalarInValues($scalars) : new AndOperator(static::inValues($scalars), $next);
    }
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);
    }
430922
public static function toOneRelationship(string $type, RuleInterface $next = null): RuleInterface
    {
        $primary = new ToOneRelationshipTypeCheckerRule($type);

        return $next === null ? $primary : new AndOperator($primary, $next);
    }
720919
protected static function lessOrEquals($value, RuleInterface $next = null): RuleInterface
    {
        return $next === null ?
            $value instanceof DateTimeInterface ? new DateTimeLessOrEquals($value) : new NumericLessOrEquals($value) :
            new AndOperator(static::lessOrEquals($value), $next);
    }
214103
public function execute(Command $command, callable $next)
    {
        if (class_exists('phpDocumentor\Event\Dispatcher')) {
            Dispatcher::getInstance()->dispatch(
                'parser.file.pre',
                PreFileEvent::createInstance($this)->setFile($command->getFile()->path())
            );
        }

        return $next($command);
    }
418617
public function handle( $request, Closure $next, $guard = null )
	{
		return AccountManager::i()->guard( $guard )->basic() ?: $next( $request );
	}
689615
protected static function moreOrEquals($value, RuleInterface $next = null): RuleInterface
    {
        return $next === null ?
            ($value instanceof DateTimeInterface ?
                new DateTimeMoreOrEquals($value) : new NumericMoreOrEqualsThan($value)) :
            new AndOperator(static::moreOrEquals($value), $next);
    }
1171439
protected static function isDateTime(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsDateTime() : new AndOperator(new AsDateTime(), $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();
    }
340655
public static function asJsonApiDateTime(RuleInterface $next = null): RuleInterface
    {
        return self::stringToDateTime(DateTime::JSON_API_FORMAT, $next);
    }
1026271
public function execute($command, callable $next)
    {
        if ($command instanceof FallbackCommand) {
            $command->message = new TextTemplate();
            $command->message->text = "Oops! I dont know wath you say.";
        }

        return $next($command);
    }
1231658
public function handle($request, Closure $next)
    {
        $this->authorizer->setRequest($request);

        $this->authorizer->checkAuthCodeRequest();

        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);
    }
563334
protected static function stringToDateTime(string $format, RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new StringToDateTime($format) : new AndOperator(new StringToDateTime($format), $next);
    }