private function assertCorrectService(ContainerBuilder $container, $serviceId)
    {
        $definition = $container->findDefinition($serviceId);
        $reflection = new ReflectionClass($definition->getClass());
        if (!$reflection->implementsInterface(WorkerRunnerInterface::class)) {
            throw new InvalidArgumentException('Runner service has to implement WorkerRunnerInterface.');
        }
    }
private function assertCorrectService(ContainerBuilder $container, $serviceId)
    {
        $definition = $container->findDefinition($serviceId);
        $reflection = new ReflectionClass($definition->getClass());
        if (!$reflection->implementsInterface(WorkerRunnerInterface::class)) {
            throw new InvalidArgumentException('Runner service has to implement WorkerRunnerInterface.');
        }
    }
private function assertCorrectService ( ContainerBuilder $ container , $ serviceId ) { $ definition = $ container -> findDefinition ( $ serviceId ) ; $ reflection = new ReflectionClass ( $ definition -> getClass ( ) ) ; if ( ! $ reflection -> implementsInterface ( WorkerRunnerInterface :: class ) ) { throw new InvalidArgumentException ( 'Runner service has to implement WorkerRunnerInterface.' ) ; } }
Assert valid tagged service.

@param ContainerBuilder $container
@param string $serviceId
@throws InvalidArgumentException Thrown, if tagged service does not implement correct interfaces.
Assert valid tagged service .