8000 fix field options_code indentation · symfony/maker-bundle@fd7a6fc · GitHub
[go: up one dir, main page]

Skip to content

Commit fd7a6fc

Browse files
committed
fix field options_code indentation
1 parent 2584cf7 commit fd7a6fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Doctrine/EntityDetails.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,18 @@ public function getFormFields(): array
7777
}
7878
$fieldsWithTypes[$fieldName] = [
7979
'type' => EntityType::class,
80-
'options_code' => sprintf('\'class\' => %s::class,', $relation['targetEntity']).\PHP_EOL.'\'choice_label\' => \'id\',',
80+
'options_code' => <<<EOF
81+
'class' => {$relation['targetEntity']}::class,
82+
'choice_label' => 'id',
83+
84+
EOF,
8185
'extra_use_classes' => [$relation['targetEntity']],
8286
];
87+
8388
if (\Doctrine\ORM\Mapping\ClassMetadata::MANY_TO_MANY === $relation['type']) {
84-
$fieldsWithTypes[$fieldName]['options_code'] .= "\n'multiple' => true,";
89+
$fieldsWithTypes[$fieldName]['options_code'] .= <<<EOF
90+
'multiple' => true,
91+
EOF;
8592
}
8693
}
8794

0 commit comments

Comments
 (0)
0