8000 minor #1657 Fix indentation of options_code (nicolas-grekas) · symfony/maker-bundle@2b80d6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b80d6b

Browse files
committed
minor #1657 Fix indentation of options_code (nicolas-grekas)
This PR was merged into the 1.x-dev branch. Discussion ---------- Fix indentation of options_code Similar to #1469 but doesn't rely on any CS fixer. Note that using PHP_EOL was wrong: this constant is meant to be used ONLY when outputting something on a terminal. NOT when dealing with new lines in files. Commits ------- < 8000 a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/maker-bundle/commit/91b7ce09fdcfca04bf33e03ff08c3116c23d3643/hovercard" href="https://github.com/symfony/maker-bundle/commit/91b7ce09fdcfca04bf33e03ff08c3116c23d3643">91b7ce0 Fix indentation of options_code
2 parents fa5c903 + 91b7ce0 commit 2b80d6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Doctrine/EntityDetails.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ 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' => \sprintf('\'class\' => %s::class,', $relation['targetEntity'])."\n 'choice_label' => 'id',",
8181
'extra_use_classes' => [$relation['targetEntity']],
8282
];
8383
if (\Doctrine\ORM\Mapping\ClassMetadata::MANY_TO_MANY === $relation['type']) {
84-
$fieldsWithTypes[$fieldName]['options_code'] .= "\n'multiple' => true,";
84+
$fieldsWithTypes[$fieldName]['options_code'] .= "\n 'multiple' => true,";
8585
}
8686
}
8787

0 commit comments

Comments
 (0)
0