This commit is contained in:
Tobias Schultze 2011-12-20 18:12:37 +01:00
parent 34f1b5893c
commit 1eb5583168

View File

@ -77,12 +77,12 @@ class MetadataFactory
if (class_exists($class)) {
$r = $all[0]->getReflectionClass();
$path = $this->getBasePathForClass($class, $r->getNamespacename(), dirname($r->getFilename()));
$metadata->setNamespace($r->getNamespacename());
} elseif (!$path) {
throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $class));
}
$metadata->setPath($path);
$metadata->setNamespace($r->getNamespacename());
return $metadata;
}