src/DependencyInjection/Compiler/RegisterPagerProvidersPass.php
private function assertClassImplementsPagerProviderInterface($providerId, $providerClass)
    {
        $rc = new \ReflectionClass($providerClass);

        if (!$rc->implementsInterface(PagerProviderInterface::class)) {
            throw new \InvalidArgumentException(sprintf(
                'Elastica provider "%s" with class "%s" must implement "%s".',
                $providerId,
                $providerClass,
                PagerProviderInterface::class
            ));
        }
    }
private function assertClassImplementsPagerProviderInterface($providerId, $providerClass)
    {
        $rc = new \ReflectionClass($providerClass);

        if (!$rc->implementsInterface(PagerProviderInterface::class)) {
            throw new \InvalidArgumentException(sprintf(
                'Elastica provider "%s" with class "%s" must implement "%s".',
                $providerId,
                $providerClass,
                PagerProviderInterface::class
            ));
        }
    }
@param $providerId
@param $providerClass

@throws \InvalidArgumentException if provider service does not implement PagerProviderInterface