private function resolveClassWithConstructor($class)
{
$class = $this->resolvePlaceholders($class);
$reflectionClass = new \ReflectionClass($class);
if ($reflectionClass->hasMethod('__construct')) {
$constructMethod = $reflectionClass->getMethod('__construct');
if (!$constructMethod->isPublic()) {
throw new NonPublicConstructorException($class);
}
return $constructMethod;
}
return null;
}