private function resolveFactoryClassWithMethod($factoryClass, $factoryMethod)
{
$factoryClass = $this->resolvePlaceholders($factoryClass);
if (!class_exists($factoryClass)) {
throw new ClassNotFoundException($factoryClass);
}
if (!method_exists($factoryClass, $factoryMethod)) {
throw new MethodNotFoundException($factoryClass, $factoryMethod);
}
$reflectionMethod = new \ReflectionMethod($factoryClass, $factoryMethod);
if (!$reflectionMethod->isStatic()) {
throw new NonStaticFactoryMethodException($factoryClass, $factoryMethod);
}
return $reflectionMethod;
}