From 1d2baedfd5b102f2a0f01b213147ddaa78feec2f Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 26 Nov 2016 06:22:25 +0100 Subject: [PATCH] #6068 simplified variable docblock codegen for nullable instance properties --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 1abd5a14c..1fe26e79e 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -1627,7 +1627,9 @@ public function __construct() { $lines = array(); $lines[] = $this->spaces . '/**'; - $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']) . ($this->getNullableField($fieldMapping) ? '|' . $this->getNullableField($fieldMapping) : ''); + $lines[] = $this->spaces . ' * @var ' + . $this->getType($fieldMapping['type']) + . ($this->getNullableField($fieldMapping) ? '|null' : ''); if ($this->generateAnnotations) { $lines[] = $this->spaces . ' *';