private function assertFactoryMethodIsStatic(ReflectionMethod $method)
    {
        if (!$method->isStatic()) {
            throw new WrongServicesConfigurationException(sprintf(
                'Service factory methods must be static, but `%s::%s` is not.',
                $method->getDeclaringClass()->getName(),
                $method->getName()
            ));
        }
    }