protected function createOptionsResolver(): OptionsResolver
    {
        $resolver = new OptionsResolver();

        $resolver->setDefined('limit')
            ->setAllowedTypes('limit', 'int')
            ->setAllowedValues('limit', function ($value) {
                return $value > 0;
            });

        $resolver->setDefined('offset')
            ->setAllowedTypes('offset', 'string');

        return $resolver;
    }
protected function createOptionsResolver(): OptionsResolver
    {
        $resolver = new OptionsResolver();

        $resolver->setDefined('limit')
            ->setAllowedTypes('limit', 'int')
            ->setAllowedValues('limit', function ($value) {
                return $value > 0;
            });

        $resolver->setDefined('offset')
            ->setAllowedTypes('offset', 'string');

        return $resolver;
    }
protected function createOptionsResolver ( ) : OptionsResolver { $ resolver = new OptionsResolver ( ) ; $ resolver -> setDefined ( 'limit' ) -> setAllowedTypes ( 'limit' , 'int' ) -> setAllowedValues ( 'limit' , function ( $ value ) { return $ value > 0 ; } ) ; $ resolver -> setDefined ( 'offset' ) -> setAllowedTypes ( 'offset' , 'string' ) ; return $ resolver ; }
Create a new OptionsResolver with page and per_page options.

@return OptionsResolver
Create a new OptionsResolver with page and per_page options .