Skip to content

Commit f188e77

Browse files
committed
Revert "note sure what was up with this one"
This reverts commit 496e196.
1 parent 496e196 commit f188e77

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/Util/ClassSourceManipulator.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,19 @@ public function addEntityField(string $propertyName, array $columnOptions, array
9090
$typeHint = $this->getEntityTypeHint($columnOptions['type']);
9191
$nullable = $columnOptions['nullable'] ?? false;
9292
$isId = (bool) ($columnOptions['id'] ?? false);
93-
$attributes = [];
94-
95-
if ($this->useAttributesForDoctrineMapping) {
96-
$attributes[] = $this->buildAttributeNode('ORM\Column', $columnOptions);
97-
} else {
98-
$comments[] = $this->buildAnnotationLine('@ORM\Column', $columnOptions);
99-
}
93+
$comments[] = $this->buildAnnotationLine('@ORM\Column', $columnOptions);
10094

10195
$defaultValue = null;
10296
if ('array' === $typeHint) {
10397
$defaultValue = new Node\Expr\Array_([], ['kind' => Node\Expr\Array_::KIND_SHORT]);
10498
}
10599

106-
$this->addProperty($propertyName, $comments, $defaultValue, $attributes);
100+
$this->addProperty(
101+
$propertyName,
102+
$comments,
103+
$defaultValue,
104+
[$this->buildAttributeNode('ORM\Column', $columnOptions)]
105+
);
107106

108107
$this->addGetter(
109108
$propertyName,

0 commit comments

Comments
 (0)