Skip to content

Commit

Permalink
run php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
tacman committed Nov 7, 2023
1 parent 087fd5c commit ee109e8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Doctrine/EntityDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

use Doctrine\Persistence\Mapping\ClassMetadata;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Bundle\MakerBundle\Tests\Doctrine\DoctrineHelperTest;
use Symfony\Component\Form\Extension\Core\Type\DateType;

/**
* @author Sadicov Vladimir <sadikoff@gmail.com>
Expand Down Expand Up @@ -65,12 +63,11 @@ public function getFormFields(): array

foreach ($this->metadata->fieldMappings as $fieldName => $fieldMapping) {
$propType = DoctrineHelper::getPropertyTypeForColumn($fieldMapping['type']);
if (($propType === '\\' . \DateTimeImmutable::class) ||
($propType === '\\' . \DateTimeInterface::class))
{
if (($propType === '\\'.\DateTimeImmutable::class)
|| ($propType === '\\'.\DateTimeInterface::class)) {
$fieldsWithTypes[$fieldName] = [
'type' => null,
'options_code' => "'widget' => 'single_text'"
'options_code' => "'widget' => 'single_text'",
];
}
}
Expand All @@ -80,7 +77,7 @@ public function getFormFields(): array
}
$fieldsWithTypes[$fieldName] = [
'type' => EntityType::class,
'options_code' => sprintf('\'class\' => %s::class,', $relation['targetEntity']).PHP_EOL.'\'choice_label\' => \'id\',',
'options_code' => sprintf('\'class\' => %s::class,', $relation['targetEntity']).\PHP_EOL.'\'choice_label\' => \'id\',',
'extra_use_classes' => [$relation['targetEntity']],
];
if (\Doctrine\ORM\Mapping\ClassMetadata::MANY_TO_MANY === $relation['type']) {
Expand Down

0 comments on commit ee109e8

Please sign in to comment.