From 1b7ca67fdb08e934c3652eae0b9be5f6981b328c Mon Sep 17 00:00:00 2001 From: Markus Lanthaler Date: Fri, 2 Nov 2012 17:15:44 +0100 Subject: [PATCH] Improve DocBlock annotations of generated entities Currently, the DocBlock annotations for member variables contain the variable name as description which is redundant and should be removed. Furthermore the class is annotated with the FQN instead of just the name. This makes automatically generated documentation quite ugly. --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 550cc5a3a..f5fa4b1aa 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -672,7 +672,7 @@ public function __construct() { $lines = array(); $lines[] = '/**'; - $lines[] = ' * '.$metadata->name; + $lines[] = ' * ' . $this->getClassName($metadata); if ($this->generateAnnotations) { $lines[] = ' *'; @@ -1126,7 +1126,7 @@ public function __construct() { $lines = array(); $lines[] = $this->spaces . '/**'; - $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']) . ' $' . $fieldMapping['fieldName']; + $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']); if ($this->generateAnnotations) { $lines[] = $this->spaces . ' *';