Skip to content

Commit

Permalink
DDC-771 - Bugfix in EntityGenerator generated use statement
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Aug 28, 2010
1 parent 43f8398 commit 2a2936f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/Doctrine/ORM/Tools/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private function _generateEntityNamespace(ClassMetadataInfo $metadata)
private function _generateEntityUse(ClassMetadataInfo $metadata)
{
if ($this->_extendsClass()) {
return "\n\nuse " . $this->_getClassToExtendNamespace() . ";\n";
return "\n\nuse " . $this->_getClassToExtendName() . ";\n";
}
}

Expand Down Expand Up @@ -382,13 +382,6 @@ private function _getClassToExtendName()
return $refl->getName();
}

private function _getClassToExtendNamespace()
{
$refl = new \ReflectionClass($this->_getClassToExtend());

return $refl->getNamespaceName() ? $refl->getNamespaceName():$refl->getShortName();
}

private function _getClassName(ClassMetadataInfo $metadata)
{
return ($pos = strrpos($metadata->name, '\\'))
Expand Down

0 comments on commit 2a2936f

Please sign in to comment.